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 apigateway_type_mapping
16missing = Sentinel("Missing")
17
18
19class ApiGatewayClient(object):
20    """
21    API for the API Gateway service. Use this API to manage gateways, deployments, and related items.
22    For more information, see
23    [Overview of API Gateway](/iaas/Content/APIGateway/Concepts/apigatewayoverview.htm).
24    """
25
26    def __init__(self, config, **kwargs):
27        """
28        Creates a new service client
29
30        :param dict config:
31            Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
32            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
33            the dict using :py:meth:`~oci.config.validate_config`
34
35        :param str service_endpoint: (optional)
36            The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
37            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
38            need to specify a service endpoint.
39
40        :param timeout: (optional)
41            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
42            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
43            a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
44        :type timeout: float or tuple(float, float)
45
46        :param signer: (optional)
47            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
48            provided in the config parameter.
49
50            One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
51            by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
52        :type signer: :py:class:`~oci.signer.AbstractBaseSigner`
53
54        :param obj retry_strategy: (optional)
55            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.
56            Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
57            Any value provided at the operation level will override whatever is specified at the client level.
58
59            This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
60            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>`__.
61
62        :param obj circuit_breaker_strategy: (optional)
63            A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
64            This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided.
65            The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.
66
67        :param function circuit_breaker_callback: (optional)
68            Callback function to receive any exceptions triggerred by the circuit breaker.
69        """
70        validate_config(config, signer=kwargs.get('signer'))
71        if 'signer' in kwargs:
72            signer = kwargs['signer']
73
74        elif AUTHENTICATION_TYPE_FIELD_NAME in config:
75            signer = get_signer_from_authentication_type(config)
76
77        else:
78            signer = Signer(
79                tenancy=config["tenancy"],
80                user=config["user"],
81                fingerprint=config["fingerprint"],
82                private_key_file_location=config.get("key_file"),
83                pass_phrase=get_config_value_or_default(config, "pass_phrase"),
84                private_key_content=config.get("key_content")
85            )
86
87        base_client_init_kwargs = {
88            'regional_client': True,
89            'service_endpoint': kwargs.get('service_endpoint'),
90            'base_path': '/20190501',
91            'service_endpoint_template': 'https://apigateway.{region}.oci.{secondLevelDomain}',
92            'skip_deserialization': kwargs.get('skip_deserialization', False),
93            'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY)
94        }
95        if 'timeout' in kwargs:
96            base_client_init_kwargs['timeout'] = kwargs.get('timeout')
97        if base_client_init_kwargs.get('circuit_breaker_strategy') is None:
98            base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY
99        self.base_client = BaseClient("api_gateway", config, signer, apigateway_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
103    def change_api_compartment(self, api_id, change_api_compartment_details, **kwargs):
104        """
105        Changes the API compartment.
106
107
108        :param str api_id: (required)
109            The ocid of the API.
110
111        :param oci.apigateway.models.ChangeApiCompartmentDetails change_api_compartment_details: (required)
112            Details of the target compartment.
113
114        :param str opc_retry_token: (optional)
115            A token that uniquely identifies a request so it can be retried in case of a timeout or
116            server error without risk of executing that same action again. Retry tokens expire after 24
117            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
118            has been deleted and purged from the system, then a retry of the original creation request
119            might be rejected.
120
121        :param str if_match: (optional)
122            For optimistic concurrency control. In the PUT or DELETE call
123            for a resource, set the `if-match` parameter to the value of the
124            etag from a previous GET or POST response for that resource.
125            The resource will be updated or deleted only if the etag you
126            provide matches the resource's current etag value.
127
128        :param str opc_request_id: (optional)
129            The client request id for tracing.
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/apigateway/change_api_compartment.py.html>`__ to see an example of how to use change_api_compartment API.
144        """
145        resource_path = "/apis/{apiId}/actions/changeCompartment"
146        method = "POST"
147
148        # Don't accept unknown kwargs
149        expected_kwargs = [
150            "retry_strategy",
151            "opc_retry_token",
152            "if_match",
153            "opc_request_id"
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                "change_api_compartment got unknown kwargs: {!r}".format(extra_kwargs))
159
160        path_params = {
161            "apiId": api_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-retry-token": kwargs.get("opc_retry_token", missing),
174            "if-match": kwargs.get("if_match", missing),
175            "opc-request-id": kwargs.get("opc_request_id", 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                body=change_api_compartment_details)
196        else:
197            return self.base_client.call_api(
198                resource_path=resource_path,
199                method=method,
200                path_params=path_params,
201                header_params=header_params,
202                body=change_api_compartment_details)
203
204    def change_certificate_compartment(self, certificate_id, change_certificate_compartment_details, **kwargs):
205        """
206        Changes the certificate compartment.
207
208
209        :param str certificate_id: (required)
210            The ocid of the certificate.
211
212        :param oci.apigateway.models.ChangeCertificateCompartmentDetails change_certificate_compartment_details: (required)
213            Details of the target compartment.
214
215        :param str opc_retry_token: (optional)
216            A token that uniquely identifies a request so it can be retried in case of a timeout or
217            server error without risk of executing that same action again. Retry tokens expire after 24
218            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
219            has been deleted and purged from the system, then a retry of the original creation request
220            might be rejected.
221
222        :param str if_match: (optional)
223            For optimistic concurrency control. In the PUT or DELETE call
224            for a resource, set the `if-match` parameter to the value of the
225            etag from a previous GET or POST response for that resource.
226            The resource will be updated or deleted only if the etag you
227            provide matches the resource's current etag value.
228
229        :param str opc_request_id: (optional)
230            The client request id for tracing.
231
232        :param obj retry_strategy: (optional)
233            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
234
235            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.
236            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
237
238            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
239
240        :return: A :class:`~oci.response.Response` object with data of type None
241        :rtype: :class:`~oci.response.Response`
242
243        :example:
244        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/change_certificate_compartment.py.html>`__ to see an example of how to use change_certificate_compartment API.
245        """
246        resource_path = "/certificates/{certificateId}/actions/changeCompartment"
247        method = "POST"
248
249        # Don't accept unknown kwargs
250        expected_kwargs = [
251            "retry_strategy",
252            "opc_retry_token",
253            "if_match",
254            "opc_request_id"
255        ]
256        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
257        if extra_kwargs:
258            raise ValueError(
259                "change_certificate_compartment got unknown kwargs: {!r}".format(extra_kwargs))
260
261        path_params = {
262            "certificateId": certificate_id
263        }
264
265        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
266
267        for (k, v) in six.iteritems(path_params):
268            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
269                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
270
271        header_params = {
272            "accept": "application/json",
273            "content-type": "application/json",
274            "opc-retry-token": kwargs.get("opc_retry_token", missing),
275            "if-match": kwargs.get("if_match", missing),
276            "opc-request-id": kwargs.get("opc_request_id", missing)
277        }
278        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
279
280        retry_strategy = self.base_client.get_preferred_retry_strategy(
281            operation_retry_strategy=kwargs.get('retry_strategy'),
282            client_retry_strategy=self.retry_strategy
283        )
284
285        if retry_strategy:
286            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
287                self.base_client.add_opc_retry_token_if_needed(header_params)
288                self.base_client.add_opc_client_retries_header(header_params)
289                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
290            return retry_strategy.make_retrying_call(
291                self.base_client.call_api,
292                resource_path=resource_path,
293                method=method,
294                path_params=path_params,
295                header_params=header_params,
296                body=change_certificate_compartment_details)
297        else:
298            return self.base_client.call_api(
299                resource_path=resource_path,
300                method=method,
301                path_params=path_params,
302                header_params=header_params,
303                body=change_certificate_compartment_details)
304
305    def create_api(self, create_api_details, **kwargs):
306        """
307        Creates a new API.
308
309
310        :param oci.apigateway.models.CreateApiDetails create_api_details: (required)
311            Details for the new API.
312
313        :param str opc_retry_token: (optional)
314            A token that uniquely identifies a request so it can be retried in case of a timeout or
315            server error without risk of executing that same action again. Retry tokens expire after 24
316            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
317            has been deleted and purged from the system, then a retry of the original creation request
318            might be rejected.
319
320        :param str opc_request_id: (optional)
321            The client request id for tracing.
322
323        :param obj retry_strategy: (optional)
324            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
325
326            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.
327            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
328
329            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
330
331        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Api`
332        :rtype: :class:`~oci.response.Response`
333
334        :example:
335        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/create_api.py.html>`__ to see an example of how to use create_api API.
336        """
337        resource_path = "/apis"
338        method = "POST"
339
340        # Don't accept unknown kwargs
341        expected_kwargs = [
342            "retry_strategy",
343            "opc_retry_token",
344            "opc_request_id"
345        ]
346        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
347        if extra_kwargs:
348            raise ValueError(
349                "create_api got unknown kwargs: {!r}".format(extra_kwargs))
350
351        header_params = {
352            "accept": "application/json",
353            "content-type": "application/json",
354            "opc-retry-token": kwargs.get("opc_retry_token", missing),
355            "opc-request-id": kwargs.get("opc_request_id", missing)
356        }
357        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
358
359        retry_strategy = self.base_client.get_preferred_retry_strategy(
360            operation_retry_strategy=kwargs.get('retry_strategy'),
361            client_retry_strategy=self.retry_strategy
362        )
363
364        if retry_strategy:
365            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
366                self.base_client.add_opc_retry_token_if_needed(header_params)
367                self.base_client.add_opc_client_retries_header(header_params)
368                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
369            return retry_strategy.make_retrying_call(
370                self.base_client.call_api,
371                resource_path=resource_path,
372                method=method,
373                header_params=header_params,
374                body=create_api_details,
375                response_type="Api")
376        else:
377            return self.base_client.call_api(
378                resource_path=resource_path,
379                method=method,
380                header_params=header_params,
381                body=create_api_details,
382                response_type="Api")
383
384    def create_certificate(self, create_certificate_details, **kwargs):
385        """
386        Creates a new Certificate.
387
388
389        :param oci.apigateway.models.CreateCertificateDetails create_certificate_details: (required)
390            Details for the new certificate
391
392        :param str opc_retry_token: (optional)
393            A token that uniquely identifies a request so it can be retried in case of a timeout or
394            server error without risk of executing that same action again. Retry tokens expire after 24
395            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
396            has been deleted and purged from the system, then a retry of the original creation request
397            might be rejected.
398
399        :param str opc_request_id: (optional)
400            The client request id for tracing.
401
402        :param obj retry_strategy: (optional)
403            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
404
405            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.
406            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
407
408            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
409
410        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Certificate`
411        :rtype: :class:`~oci.response.Response`
412
413        :example:
414        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/create_certificate.py.html>`__ to see an example of how to use create_certificate API.
415        """
416        resource_path = "/certificates"
417        method = "POST"
418
419        # Don't accept unknown kwargs
420        expected_kwargs = [
421            "retry_strategy",
422            "opc_retry_token",
423            "opc_request_id"
424        ]
425        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
426        if extra_kwargs:
427            raise ValueError(
428                "create_certificate got unknown kwargs: {!r}".format(extra_kwargs))
429
430        header_params = {
431            "accept": "application/json",
432            "content-type": "application/json",
433            "opc-retry-token": kwargs.get("opc_retry_token", missing),
434            "opc-request-id": kwargs.get("opc_request_id", missing)
435        }
436        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
437
438        retry_strategy = self.base_client.get_preferred_retry_strategy(
439            operation_retry_strategy=kwargs.get('retry_strategy'),
440            client_retry_strategy=self.retry_strategy
441        )
442
443        if retry_strategy:
444            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
445                self.base_client.add_opc_retry_token_if_needed(header_params)
446                self.base_client.add_opc_client_retries_header(header_params)
447                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
448            return retry_strategy.make_retrying_call(
449                self.base_client.call_api,
450                resource_path=resource_path,
451                method=method,
452                header_params=header_params,
453                body=create_certificate_details,
454                response_type="Certificate")
455        else:
456            return self.base_client.call_api(
457                resource_path=resource_path,
458                method=method,
459                header_params=header_params,
460                body=create_certificate_details,
461                response_type="Certificate")
462
463    def create_sdk(self, create_sdk_details, **kwargs):
464        """
465        Creates a new SDK.
466
467
468        :param oci.apigateway.models.CreateSdkDetails create_sdk_details: (required)
469            Details for the new SDK.
470
471        :param str opc_retry_token: (optional)
472            A token that uniquely identifies a request so it can be retried in case of a timeout or
473            server error without risk of executing that same action again. Retry tokens expire after 24
474            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
475            has been deleted and purged from the system, then a retry of the original creation request
476            might be rejected.
477
478        :param str opc_request_id: (optional)
479            The client request id for tracing.
480
481        :param obj retry_strategy: (optional)
482            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
483
484            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.
485            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
486
487            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
488
489        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Sdk`
490        :rtype: :class:`~oci.response.Response`
491
492        :example:
493        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/create_sdk.py.html>`__ to see an example of how to use create_sdk API.
494        """
495        resource_path = "/sdks"
496        method = "POST"
497
498        # Don't accept unknown kwargs
499        expected_kwargs = [
500            "retry_strategy",
501            "opc_retry_token",
502            "opc_request_id"
503        ]
504        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
505        if extra_kwargs:
506            raise ValueError(
507                "create_sdk got unknown kwargs: {!r}".format(extra_kwargs))
508
509        header_params = {
510            "accept": "application/json",
511            "content-type": "application/json",
512            "opc-retry-token": kwargs.get("opc_retry_token", missing),
513            "opc-request-id": kwargs.get("opc_request_id", missing)
514        }
515        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
516
517        retry_strategy = self.base_client.get_preferred_retry_strategy(
518            operation_retry_strategy=kwargs.get('retry_strategy'),
519            client_retry_strategy=self.retry_strategy
520        )
521
522        if retry_strategy:
523            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
524                self.base_client.add_opc_retry_token_if_needed(header_params)
525                self.base_client.add_opc_client_retries_header(header_params)
526                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
527            return retry_strategy.make_retrying_call(
528                self.base_client.call_api,
529                resource_path=resource_path,
530                method=method,
531                header_params=header_params,
532                body=create_sdk_details,
533                response_type="Sdk")
534        else:
535            return self.base_client.call_api(
536                resource_path=resource_path,
537                method=method,
538                header_params=header_params,
539                body=create_sdk_details,
540                response_type="Sdk")
541
542    def delete_api(self, api_id, **kwargs):
543        """
544        Deletes the API with the given identifier.
545
546
547        :param str api_id: (required)
548            The ocid of the API.
549
550        :param str if_match: (optional)
551            For optimistic concurrency control. In the PUT or DELETE call
552            for a resource, set the `if-match` parameter to the value of the
553            etag from a previous GET or POST response for that resource.
554            The resource will be updated or deleted only if the etag you
555            provide matches the resource's current etag value.
556
557        :param str opc_request_id: (optional)
558            The client request id for tracing.
559
560        :param obj retry_strategy: (optional)
561            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
562
563            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.
564            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
565
566            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
567
568        :return: A :class:`~oci.response.Response` object with data of type None
569        :rtype: :class:`~oci.response.Response`
570
571        :example:
572        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/delete_api.py.html>`__ to see an example of how to use delete_api API.
573        """
574        resource_path = "/apis/{apiId}"
575        method = "DELETE"
576
577        # Don't accept unknown kwargs
578        expected_kwargs = [
579            "retry_strategy",
580            "if_match",
581            "opc_request_id"
582        ]
583        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
584        if extra_kwargs:
585            raise ValueError(
586                "delete_api got unknown kwargs: {!r}".format(extra_kwargs))
587
588        path_params = {
589            "apiId": api_id
590        }
591
592        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
593
594        for (k, v) in six.iteritems(path_params):
595            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
596                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
597
598        header_params = {
599            "accept": "application/json",
600            "content-type": "application/json",
601            "if-match": kwargs.get("if_match", missing),
602            "opc-request-id": kwargs.get("opc_request_id", missing)
603        }
604        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
605
606        retry_strategy = self.base_client.get_preferred_retry_strategy(
607            operation_retry_strategy=kwargs.get('retry_strategy'),
608            client_retry_strategy=self.retry_strategy
609        )
610
611        if retry_strategy:
612            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
613                self.base_client.add_opc_client_retries_header(header_params)
614                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
615            return retry_strategy.make_retrying_call(
616                self.base_client.call_api,
617                resource_path=resource_path,
618                method=method,
619                path_params=path_params,
620                header_params=header_params)
621        else:
622            return self.base_client.call_api(
623                resource_path=resource_path,
624                method=method,
625                path_params=path_params,
626                header_params=header_params)
627
628    def delete_certificate(self, certificate_id, **kwargs):
629        """
630        Deletes the certificate with the given identifier.
631
632
633        :param str certificate_id: (required)
634            The ocid of the certificate.
635
636        :param str if_match: (optional)
637            For optimistic concurrency control. In the PUT or DELETE call
638            for a resource, set the `if-match` parameter to the value of the
639            etag from a previous GET or POST response for that resource.
640            The resource will be updated or deleted only if the etag you
641            provide matches the resource's current etag value.
642
643        :param str opc_request_id: (optional)
644            The client request id for tracing.
645
646        :param obj retry_strategy: (optional)
647            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
648
649            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.
650            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
651
652            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
653
654        :return: A :class:`~oci.response.Response` object with data of type None
655        :rtype: :class:`~oci.response.Response`
656
657        :example:
658        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/delete_certificate.py.html>`__ to see an example of how to use delete_certificate API.
659        """
660        resource_path = "/certificates/{certificateId}"
661        method = "DELETE"
662
663        # Don't accept unknown kwargs
664        expected_kwargs = [
665            "retry_strategy",
666            "if_match",
667            "opc_request_id"
668        ]
669        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
670        if extra_kwargs:
671            raise ValueError(
672                "delete_certificate got unknown kwargs: {!r}".format(extra_kwargs))
673
674        path_params = {
675            "certificateId": certificate_id
676        }
677
678        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
679
680        for (k, v) in six.iteritems(path_params):
681            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
682                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
683
684        header_params = {
685            "accept": "application/json",
686            "content-type": "application/json",
687            "if-match": kwargs.get("if_match", missing),
688            "opc-request-id": kwargs.get("opc_request_id", missing)
689        }
690        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
691
692        retry_strategy = self.base_client.get_preferred_retry_strategy(
693            operation_retry_strategy=kwargs.get('retry_strategy'),
694            client_retry_strategy=self.retry_strategy
695        )
696
697        if retry_strategy:
698            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
699                self.base_client.add_opc_client_retries_header(header_params)
700                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
701            return retry_strategy.make_retrying_call(
702                self.base_client.call_api,
703                resource_path=resource_path,
704                method=method,
705                path_params=path_params,
706                header_params=header_params)
707        else:
708            return self.base_client.call_api(
709                resource_path=resource_path,
710                method=method,
711                path_params=path_params,
712                header_params=header_params)
713
714    def delete_sdk(self, sdk_id, **kwargs):
715        """
716        Deletes provided SDK.
717
718
719        :param str sdk_id: (required)
720            The ocid of the SDK.
721
722        :param str opc_request_id: (optional)
723            The client request id for tracing.
724
725        :param str if_match: (optional)
726            For optimistic concurrency control. In the PUT or DELETE call
727            for a resource, set the `if-match` parameter to the value of the
728            etag from a previous GET or POST response for that resource.
729            The resource will be updated or deleted only if the etag you
730            provide matches the resource's current etag value.
731
732        :param obj retry_strategy: (optional)
733            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
734
735            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.
736            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
737
738            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
739
740        :return: A :class:`~oci.response.Response` object with data of type None
741        :rtype: :class:`~oci.response.Response`
742
743        :example:
744        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/delete_sdk.py.html>`__ to see an example of how to use delete_sdk API.
745        """
746        resource_path = "/sdks/{sdkId}"
747        method = "DELETE"
748
749        # Don't accept unknown kwargs
750        expected_kwargs = [
751            "retry_strategy",
752            "opc_request_id",
753            "if_match"
754        ]
755        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
756        if extra_kwargs:
757            raise ValueError(
758                "delete_sdk got unknown kwargs: {!r}".format(extra_kwargs))
759
760        path_params = {
761            "sdkId": sdk_id
762        }
763
764        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
765
766        for (k, v) in six.iteritems(path_params):
767            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
768                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
769
770        header_params = {
771            "accept": "application/json",
772            "content-type": "application/json",
773            "opc-request-id": kwargs.get("opc_request_id", missing),
774            "if-match": kwargs.get("if_match", missing)
775        }
776        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
777
778        retry_strategy = self.base_client.get_preferred_retry_strategy(
779            operation_retry_strategy=kwargs.get('retry_strategy'),
780            client_retry_strategy=self.retry_strategy
781        )
782
783        if retry_strategy:
784            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
785                self.base_client.add_opc_client_retries_header(header_params)
786                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
787            return retry_strategy.make_retrying_call(
788                self.base_client.call_api,
789                resource_path=resource_path,
790                method=method,
791                path_params=path_params,
792                header_params=header_params)
793        else:
794            return self.base_client.call_api(
795                resource_path=resource_path,
796                method=method,
797                path_params=path_params,
798                header_params=header_params)
799
800    def get_api(self, api_id, **kwargs):
801        """
802        Gets an API by identifier.
803
804
805        :param str api_id: (required)
806            The ocid of the API.
807
808        :param str opc_request_id: (optional)
809            The client request id for tracing.
810
811        :param obj retry_strategy: (optional)
812            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
813
814            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.
815            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
816
817            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
818
819        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Api`
820        :rtype: :class:`~oci.response.Response`
821
822        :example:
823        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/get_api.py.html>`__ to see an example of how to use get_api API.
824        """
825        resource_path = "/apis/{apiId}"
826        method = "GET"
827
828        # Don't accept unknown kwargs
829        expected_kwargs = [
830            "retry_strategy",
831            "opc_request_id"
832        ]
833        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
834        if extra_kwargs:
835            raise ValueError(
836                "get_api got unknown kwargs: {!r}".format(extra_kwargs))
837
838        path_params = {
839            "apiId": api_id
840        }
841
842        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
843
844        for (k, v) in six.iteritems(path_params):
845            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
846                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
847
848        header_params = {
849            "accept": "application/json",
850            "content-type": "application/json",
851            "opc-request-id": kwargs.get("opc_request_id", missing)
852        }
853        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
854
855        retry_strategy = self.base_client.get_preferred_retry_strategy(
856            operation_retry_strategy=kwargs.get('retry_strategy'),
857            client_retry_strategy=self.retry_strategy
858        )
859
860        if retry_strategy:
861            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
862                self.base_client.add_opc_client_retries_header(header_params)
863                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
864            return retry_strategy.make_retrying_call(
865                self.base_client.call_api,
866                resource_path=resource_path,
867                method=method,
868                path_params=path_params,
869                header_params=header_params,
870                response_type="Api")
871        else:
872            return self.base_client.call_api(
873                resource_path=resource_path,
874                method=method,
875                path_params=path_params,
876                header_params=header_params,
877                response_type="Api")
878
879    def get_api_content(self, api_id, **kwargs):
880        """
881        Get the raw API content.
882
883
884        :param str api_id: (required)
885            The ocid of the API.
886
887        :param str opc_request_id: (optional)
888            The client request id for tracing.
889
890        :param str if_match: (optional)
891            For optimistic concurrency control. In the PUT or DELETE call
892            for a resource, set the `if-match` parameter to the value of the
893            etag from a previous GET or POST response for that resource.
894            The resource will be updated or deleted only if the etag you
895            provide matches the resource's current etag value.
896
897        :param str range: (optional)
898            The Range HTTP request header indicates the part of a document that the
899            server should return. `RFC 7233`__.
900            Note that only a single range of bytes is supported.
901
902            __ https://tools.ietf.org/html/rfc7233#section-3.1
903
904        :param obj retry_strategy: (optional)
905            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
906
907            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.
908            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
909
910            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
911
912        :return: A :class:`~oci.response.Response` object with data of type stream
913        :rtype: :class:`~oci.response.Response`
914
915        :example:
916        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/get_api_content.py.html>`__ to see an example of how to use get_api_content API.
917        """
918        resource_path = "/apis/{apiId}/content"
919        method = "GET"
920
921        # Don't accept unknown kwargs
922        expected_kwargs = [
923            "retry_strategy",
924            "opc_request_id",
925            "if_match",
926            "range"
927        ]
928        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
929        if extra_kwargs:
930            raise ValueError(
931                "get_api_content got unknown kwargs: {!r}".format(extra_kwargs))
932
933        path_params = {
934            "apiId": api_id
935        }
936
937        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
938
939        for (k, v) in six.iteritems(path_params):
940            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
941                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
942
943        header_params = {
944            "accept": "application/json",
945            "content-type": "application/json",
946            "opc-request-id": kwargs.get("opc_request_id", missing),
947            "if-match": kwargs.get("if_match", missing),
948            "range": kwargs.get("range", missing)
949        }
950        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
951
952        retry_strategy = self.base_client.get_preferred_retry_strategy(
953            operation_retry_strategy=kwargs.get('retry_strategy'),
954            client_retry_strategy=self.retry_strategy
955        )
956
957        if retry_strategy:
958            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
959                self.base_client.add_opc_client_retries_header(header_params)
960                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
961            return retry_strategy.make_retrying_call(
962                self.base_client.call_api,
963                resource_path=resource_path,
964                method=method,
965                path_params=path_params,
966                header_params=header_params,
967                response_type="stream")
968        else:
969            return self.base_client.call_api(
970                resource_path=resource_path,
971                method=method,
972                path_params=path_params,
973                header_params=header_params,
974                response_type="stream")
975
976    def get_api_deployment_specification(self, api_id, **kwargs):
977        """
978        Gets an API Deployment specification by identifier.
979
980
981        :param str api_id: (required)
982            The ocid of the API.
983
984        :param str opc_request_id: (optional)
985            The client request id for tracing.
986
987        :param str if_match: (optional)
988            For optimistic concurrency control. In the PUT or DELETE call
989            for a resource, set the `if-match` parameter to the value of the
990            etag from a previous GET or POST response for that resource.
991            The resource will be updated or deleted only if the etag you
992            provide matches the resource's current etag value.
993
994        :param obj retry_strategy: (optional)
995            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
996
997            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.
998            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
999
1000            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1001
1002        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.ApiSpecification`
1003        :rtype: :class:`~oci.response.Response`
1004
1005        :example:
1006        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/get_api_deployment_specification.py.html>`__ to see an example of how to use get_api_deployment_specification API.
1007        """
1008        resource_path = "/apis/{apiId}/deploymentSpecification"
1009        method = "GET"
1010
1011        # Don't accept unknown kwargs
1012        expected_kwargs = [
1013            "retry_strategy",
1014            "opc_request_id",
1015            "if_match"
1016        ]
1017        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1018        if extra_kwargs:
1019            raise ValueError(
1020                "get_api_deployment_specification got unknown kwargs: {!r}".format(extra_kwargs))
1021
1022        path_params = {
1023            "apiId": api_id
1024        }
1025
1026        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1027
1028        for (k, v) in six.iteritems(path_params):
1029            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1030                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1031
1032        header_params = {
1033            "accept": "application/json",
1034            "content-type": "application/json",
1035            "opc-request-id": kwargs.get("opc_request_id", missing),
1036            "if-match": kwargs.get("if_match", missing)
1037        }
1038        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1039
1040        retry_strategy = self.base_client.get_preferred_retry_strategy(
1041            operation_retry_strategy=kwargs.get('retry_strategy'),
1042            client_retry_strategy=self.retry_strategy
1043        )
1044
1045        if retry_strategy:
1046            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1047                self.base_client.add_opc_client_retries_header(header_params)
1048                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1049            return retry_strategy.make_retrying_call(
1050                self.base_client.call_api,
1051                resource_path=resource_path,
1052                method=method,
1053                path_params=path_params,
1054                header_params=header_params,
1055                response_type="ApiSpecification")
1056        else:
1057            return self.base_client.call_api(
1058                resource_path=resource_path,
1059                method=method,
1060                path_params=path_params,
1061                header_params=header_params,
1062                response_type="ApiSpecification")
1063
1064    def get_api_validations(self, api_id, **kwargs):
1065        """
1066        Gets the API validation results.
1067
1068
1069        :param str api_id: (required)
1070            The ocid of the API.
1071
1072        :param str opc_request_id: (optional)
1073            The client request id for tracing.
1074
1075        :param str if_match: (optional)
1076            For optimistic concurrency control. In the PUT or DELETE call
1077            for a resource, set the `if-match` parameter to the value of the
1078            etag from a previous GET or POST response for that resource.
1079            The resource will be updated or deleted only if the etag you
1080            provide matches the resource's current etag value.
1081
1082        :param obj retry_strategy: (optional)
1083            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1084
1085            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.
1086            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1087
1088            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1089
1090        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.ApiValidations`
1091        :rtype: :class:`~oci.response.Response`
1092
1093        :example:
1094        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/get_api_validations.py.html>`__ to see an example of how to use get_api_validations API.
1095        """
1096        resource_path = "/apis/{apiId}/validations"
1097        method = "GET"
1098
1099        # Don't accept unknown kwargs
1100        expected_kwargs = [
1101            "retry_strategy",
1102            "opc_request_id",
1103            "if_match"
1104        ]
1105        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1106        if extra_kwargs:
1107            raise ValueError(
1108                "get_api_validations got unknown kwargs: {!r}".format(extra_kwargs))
1109
1110        path_params = {
1111            "apiId": api_id
1112        }
1113
1114        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1115
1116        for (k, v) in six.iteritems(path_params):
1117            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1118                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1119
1120        header_params = {
1121            "accept": "application/json",
1122            "content-type": "application/json",
1123            "opc-request-id": kwargs.get("opc_request_id", missing),
1124            "if-match": kwargs.get("if_match", missing)
1125        }
1126        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1127
1128        retry_strategy = self.base_client.get_preferred_retry_strategy(
1129            operation_retry_strategy=kwargs.get('retry_strategy'),
1130            client_retry_strategy=self.retry_strategy
1131        )
1132
1133        if retry_strategy:
1134            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1135                self.base_client.add_opc_client_retries_header(header_params)
1136                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1137            return retry_strategy.make_retrying_call(
1138                self.base_client.call_api,
1139                resource_path=resource_path,
1140                method=method,
1141                path_params=path_params,
1142                header_params=header_params,
1143                response_type="ApiValidations")
1144        else:
1145            return self.base_client.call_api(
1146                resource_path=resource_path,
1147                method=method,
1148                path_params=path_params,
1149                header_params=header_params,
1150                response_type="ApiValidations")
1151
1152    def get_certificate(self, certificate_id, **kwargs):
1153        """
1154        Gets a certificate by identifier.
1155
1156
1157        :param str certificate_id: (required)
1158            The ocid of the certificate.
1159
1160        :param str opc_request_id: (optional)
1161            The client request id for tracing.
1162
1163        :param obj retry_strategy: (optional)
1164            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1165
1166            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.
1167            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1168
1169            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1170
1171        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Certificate`
1172        :rtype: :class:`~oci.response.Response`
1173
1174        :example:
1175        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/get_certificate.py.html>`__ to see an example of how to use get_certificate API.
1176        """
1177        resource_path = "/certificates/{certificateId}"
1178        method = "GET"
1179
1180        # Don't accept unknown kwargs
1181        expected_kwargs = [
1182            "retry_strategy",
1183            "opc_request_id"
1184        ]
1185        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1186        if extra_kwargs:
1187            raise ValueError(
1188                "get_certificate got unknown kwargs: {!r}".format(extra_kwargs))
1189
1190        path_params = {
1191            "certificateId": certificate_id
1192        }
1193
1194        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1195
1196        for (k, v) in six.iteritems(path_params):
1197            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1198                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1199
1200        header_params = {
1201            "accept": "application/json",
1202            "content-type": "application/json",
1203            "opc-request-id": kwargs.get("opc_request_id", missing)
1204        }
1205        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1206
1207        retry_strategy = self.base_client.get_preferred_retry_strategy(
1208            operation_retry_strategy=kwargs.get('retry_strategy'),
1209            client_retry_strategy=self.retry_strategy
1210        )
1211
1212        if retry_strategy:
1213            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1214                self.base_client.add_opc_client_retries_header(header_params)
1215                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1216            return retry_strategy.make_retrying_call(
1217                self.base_client.call_api,
1218                resource_path=resource_path,
1219                method=method,
1220                path_params=path_params,
1221                header_params=header_params,
1222                response_type="Certificate")
1223        else:
1224            return self.base_client.call_api(
1225                resource_path=resource_path,
1226                method=method,
1227                path_params=path_params,
1228                header_params=header_params,
1229                response_type="Certificate")
1230
1231    def get_sdk(self, sdk_id, **kwargs):
1232        """
1233        Return object store downloadable URL and metadata.
1234
1235
1236        :param str sdk_id: (required)
1237            The ocid of the SDK.
1238
1239        :param str opc_request_id: (optional)
1240            The client request id for tracing.
1241
1242        :param obj retry_strategy: (optional)
1243            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1244
1245            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.
1246            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1247
1248            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1249
1250        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Sdk`
1251        :rtype: :class:`~oci.response.Response`
1252
1253        :example:
1254        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/get_sdk.py.html>`__ to see an example of how to use get_sdk API.
1255        """
1256        resource_path = "/sdks/{sdkId}"
1257        method = "GET"
1258
1259        # Don't accept unknown kwargs
1260        expected_kwargs = [
1261            "retry_strategy",
1262            "opc_request_id"
1263        ]
1264        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1265        if extra_kwargs:
1266            raise ValueError(
1267                "get_sdk got unknown kwargs: {!r}".format(extra_kwargs))
1268
1269        path_params = {
1270            "sdkId": sdk_id
1271        }
1272
1273        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1274
1275        for (k, v) in six.iteritems(path_params):
1276            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1277                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1278
1279        header_params = {
1280            "accept": "application/json",
1281            "content-type": "application/json",
1282            "opc-request-id": kwargs.get("opc_request_id", missing)
1283        }
1284        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1285
1286        retry_strategy = self.base_client.get_preferred_retry_strategy(
1287            operation_retry_strategy=kwargs.get('retry_strategy'),
1288            client_retry_strategy=self.retry_strategy
1289        )
1290
1291        if retry_strategy:
1292            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1293                self.base_client.add_opc_client_retries_header(header_params)
1294                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1295            return retry_strategy.make_retrying_call(
1296                self.base_client.call_api,
1297                resource_path=resource_path,
1298                method=method,
1299                path_params=path_params,
1300                header_params=header_params,
1301                response_type="Sdk")
1302        else:
1303            return self.base_client.call_api(
1304                resource_path=resource_path,
1305                method=method,
1306                path_params=path_params,
1307                header_params=header_params,
1308                response_type="Sdk")
1309
1310    def list_apis(self, compartment_id, **kwargs):
1311        """
1312        Returns a list of APIs.
1313
1314
1315        :param str compartment_id: (required)
1316            The ocid of the compartment in which to list resources.
1317
1318        :param str display_name: (optional)
1319            A user-friendly name. Does not have to be unique, and it's changeable.
1320
1321            Example: `My new resource`
1322
1323        :param str lifecycle_state: (optional)
1324            A filter to return only resources that match the given lifecycle state.
1325
1326            Example: `ACTIVE`
1327
1328            Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
1329
1330        :param int limit: (optional)
1331            The maximum number of items to return.
1332
1333        :param str page: (optional)
1334            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
1335
1336        :param str sort_order: (optional)
1337            The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value.
1338
1339            Allowed values are: "ASC", "DESC"
1340
1341        :param str sort_by: (optional)
1342            The field to sort by. You can provide one sort order (`sortOrder`).
1343            Default order for `timeCreated` is descending. Default order for
1344            `displayName` is ascending. The `displayName` sort order is case
1345            sensitive.
1346
1347            Allowed values are: "timeCreated", "displayName"
1348
1349        :param str opc_request_id: (optional)
1350            The client request id for tracing.
1351
1352        :param obj retry_strategy: (optional)
1353            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1354
1355            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.
1356            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1357
1358            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1359
1360        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.ApiCollection`
1361        :rtype: :class:`~oci.response.Response`
1362
1363        :example:
1364        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/list_apis.py.html>`__ to see an example of how to use list_apis API.
1365        """
1366        resource_path = "/apis"
1367        method = "GET"
1368
1369        # Don't accept unknown kwargs
1370        expected_kwargs = [
1371            "retry_strategy",
1372            "display_name",
1373            "lifecycle_state",
1374            "limit",
1375            "page",
1376            "sort_order",
1377            "sort_by",
1378            "opc_request_id"
1379        ]
1380        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1381        if extra_kwargs:
1382            raise ValueError(
1383                "list_apis got unknown kwargs: {!r}".format(extra_kwargs))
1384
1385        if 'lifecycle_state' in kwargs:
1386            lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
1387            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
1388                raise ValueError(
1389                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
1390                )
1391
1392        if 'sort_order' in kwargs:
1393            sort_order_allowed_values = ["ASC", "DESC"]
1394            if kwargs['sort_order'] not in sort_order_allowed_values:
1395                raise ValueError(
1396                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
1397                )
1398
1399        if 'sort_by' in kwargs:
1400            sort_by_allowed_values = ["timeCreated", "displayName"]
1401            if kwargs['sort_by'] not in sort_by_allowed_values:
1402                raise ValueError(
1403                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
1404                )
1405
1406        query_params = {
1407            "compartmentId": compartment_id,
1408            "displayName": kwargs.get("display_name", missing),
1409            "lifecycleState": kwargs.get("lifecycle_state", missing),
1410            "limit": kwargs.get("limit", missing),
1411            "page": kwargs.get("page", missing),
1412            "sortOrder": kwargs.get("sort_order", missing),
1413            "sortBy": kwargs.get("sort_by", missing)
1414        }
1415        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1416
1417        header_params = {
1418            "accept": "application/json",
1419            "content-type": "application/json",
1420            "opc-request-id": kwargs.get("opc_request_id", missing)
1421        }
1422        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1423
1424        retry_strategy = self.base_client.get_preferred_retry_strategy(
1425            operation_retry_strategy=kwargs.get('retry_strategy'),
1426            client_retry_strategy=self.retry_strategy
1427        )
1428
1429        if retry_strategy:
1430            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1431                self.base_client.add_opc_client_retries_header(header_params)
1432                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1433            return retry_strategy.make_retrying_call(
1434                self.base_client.call_api,
1435                resource_path=resource_path,
1436                method=method,
1437                query_params=query_params,
1438                header_params=header_params,
1439                response_type="ApiCollection")
1440        else:
1441            return self.base_client.call_api(
1442                resource_path=resource_path,
1443                method=method,
1444                query_params=query_params,
1445                header_params=header_params,
1446                response_type="ApiCollection")
1447
1448    def list_certificates(self, compartment_id, **kwargs):
1449        """
1450        Returns a list of certificates.
1451
1452
1453        :param str compartment_id: (required)
1454            The ocid of the compartment in which to list resources.
1455
1456        :param str display_name: (optional)
1457            A user-friendly name. Does not have to be unique, and it's changeable.
1458
1459            Example: `My new resource`
1460
1461        :param str lifecycle_state: (optional)
1462            A filter to return only resources that match the given lifecycle state.
1463
1464            Example: `ACTIVE` or `DELETED`
1465
1466            Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
1467
1468        :param int limit: (optional)
1469            The maximum number of items to return.
1470
1471        :param str page: (optional)
1472            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
1473
1474        :param str sort_order: (optional)
1475            The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value.
1476
1477            Allowed values are: "ASC", "DESC"
1478
1479        :param str sort_by: (optional)
1480            The field to sort by. You can provide one sort order (`sortOrder`).
1481            Default order for `timeCreated` is descending. Default order for
1482            `displayName` is ascending. The `displayName` sort order is case
1483            sensitive.
1484
1485            Allowed values are: "timeCreated", "displayName"
1486
1487        :param str opc_request_id: (optional)
1488            The client request id for tracing.
1489
1490        :param obj retry_strategy: (optional)
1491            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1492
1493            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.
1494            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1495
1496            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1497
1498        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.CertificateCollection`
1499        :rtype: :class:`~oci.response.Response`
1500
1501        :example:
1502        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/list_certificates.py.html>`__ to see an example of how to use list_certificates API.
1503        """
1504        resource_path = "/certificates"
1505        method = "GET"
1506
1507        # Don't accept unknown kwargs
1508        expected_kwargs = [
1509            "retry_strategy",
1510            "display_name",
1511            "lifecycle_state",
1512            "limit",
1513            "page",
1514            "sort_order",
1515            "sort_by",
1516            "opc_request_id"
1517        ]
1518        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1519        if extra_kwargs:
1520            raise ValueError(
1521                "list_certificates got unknown kwargs: {!r}".format(extra_kwargs))
1522
1523        if 'lifecycle_state' in kwargs:
1524            lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
1525            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
1526                raise ValueError(
1527                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
1528                )
1529
1530        if 'sort_order' in kwargs:
1531            sort_order_allowed_values = ["ASC", "DESC"]
1532            if kwargs['sort_order'] not in sort_order_allowed_values:
1533                raise ValueError(
1534                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
1535                )
1536
1537        if 'sort_by' in kwargs:
1538            sort_by_allowed_values = ["timeCreated", "displayName"]
1539            if kwargs['sort_by'] not in sort_by_allowed_values:
1540                raise ValueError(
1541                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
1542                )
1543
1544        query_params = {
1545            "compartmentId": compartment_id,
1546            "displayName": kwargs.get("display_name", missing),
1547            "lifecycleState": kwargs.get("lifecycle_state", missing),
1548            "limit": kwargs.get("limit", missing),
1549            "page": kwargs.get("page", missing),
1550            "sortOrder": kwargs.get("sort_order", missing),
1551            "sortBy": kwargs.get("sort_by", missing)
1552        }
1553        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1554
1555        header_params = {
1556            "accept": "application/json",
1557            "content-type": "application/json",
1558            "opc-request-id": kwargs.get("opc_request_id", missing)
1559        }
1560        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1561
1562        retry_strategy = self.base_client.get_preferred_retry_strategy(
1563            operation_retry_strategy=kwargs.get('retry_strategy'),
1564            client_retry_strategy=self.retry_strategy
1565        )
1566
1567        if retry_strategy:
1568            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1569                self.base_client.add_opc_client_retries_header(header_params)
1570                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1571            return retry_strategy.make_retrying_call(
1572                self.base_client.call_api,
1573                resource_path=resource_path,
1574                method=method,
1575                query_params=query_params,
1576                header_params=header_params,
1577                response_type="CertificateCollection")
1578        else:
1579            return self.base_client.call_api(
1580                resource_path=resource_path,
1581                method=method,
1582                query_params=query_params,
1583                header_params=header_params,
1584                response_type="CertificateCollection")
1585
1586    def list_sdk_language_types(self, compartment_id, **kwargs):
1587        """
1588        Lists programming languages in which SDK can be generated.
1589
1590
1591        :param str compartment_id: (required)
1592            The ocid of the compartment in which to list resources.
1593
1594        :param str display_name: (optional)
1595            A user-friendly name. Does not have to be unique, and it's changeable.
1596
1597            Example: `My new resource`
1598
1599        :param int limit: (optional)
1600            The maximum number of items to return.
1601
1602        :param str page: (optional)
1603            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
1604
1605        :param str sort_order: (optional)
1606            The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value.
1607
1608            Allowed values are: "ASC", "DESC"
1609
1610        :param str sort_by: (optional)
1611            The field to sort by. You can provide one sort order (`sortOrder`).
1612            Default order for `timeCreated` is descending. Default order for
1613            `displayName` is ascending. The `displayName` sort order is case
1614            sensitive.
1615
1616            Allowed values are: "timeCreated", "displayName"
1617
1618        :param str opc_request_id: (optional)
1619            The client request id for tracing.
1620
1621        :param obj retry_strategy: (optional)
1622            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1623
1624            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.
1625            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1626
1627            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1628
1629        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.SdkLanguageTypeCollection`
1630        :rtype: :class:`~oci.response.Response`
1631
1632        :example:
1633        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/list_sdk_language_types.py.html>`__ to see an example of how to use list_sdk_language_types API.
1634        """
1635        resource_path = "/sdkLanguageTypes"
1636        method = "GET"
1637
1638        # Don't accept unknown kwargs
1639        expected_kwargs = [
1640            "retry_strategy",
1641            "display_name",
1642            "limit",
1643            "page",
1644            "sort_order",
1645            "sort_by",
1646            "opc_request_id"
1647        ]
1648        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1649        if extra_kwargs:
1650            raise ValueError(
1651                "list_sdk_language_types got unknown kwargs: {!r}".format(extra_kwargs))
1652
1653        if 'sort_order' in kwargs:
1654            sort_order_allowed_values = ["ASC", "DESC"]
1655            if kwargs['sort_order'] not in sort_order_allowed_values:
1656                raise ValueError(
1657                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
1658                )
1659
1660        if 'sort_by' in kwargs:
1661            sort_by_allowed_values = ["timeCreated", "displayName"]
1662            if kwargs['sort_by'] not in sort_by_allowed_values:
1663                raise ValueError(
1664                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
1665                )
1666
1667        query_params = {
1668            "displayName": kwargs.get("display_name", missing),
1669            "limit": kwargs.get("limit", missing),
1670            "page": kwargs.get("page", missing),
1671            "sortOrder": kwargs.get("sort_order", missing),
1672            "sortBy": kwargs.get("sort_by", missing),
1673            "compartmentId": compartment_id
1674        }
1675        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1676
1677        header_params = {
1678            "accept": "application/json",
1679            "content-type": "application/json",
1680            "opc-request-id": kwargs.get("opc_request_id", missing)
1681        }
1682        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1683
1684        retry_strategy = self.base_client.get_preferred_retry_strategy(
1685            operation_retry_strategy=kwargs.get('retry_strategy'),
1686            client_retry_strategy=self.retry_strategy
1687        )
1688
1689        if retry_strategy:
1690            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1691                self.base_client.add_opc_client_retries_header(header_params)
1692                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1693            return retry_strategy.make_retrying_call(
1694                self.base_client.call_api,
1695                resource_path=resource_path,
1696                method=method,
1697                query_params=query_params,
1698                header_params=header_params,
1699                response_type="SdkLanguageTypeCollection")
1700        else:
1701            return self.base_client.call_api(
1702                resource_path=resource_path,
1703                method=method,
1704                query_params=query_params,
1705                header_params=header_params,
1706                response_type="SdkLanguageTypeCollection")
1707
1708    def list_sdks(self, **kwargs):
1709        """
1710        Returns list of generated SDKs.
1711
1712
1713        :param str sdk_id: (optional)
1714            The ocid of the SDK.
1715
1716        :param str display_name: (optional)
1717            A user-friendly name. Does not have to be unique, and it's changeable.
1718
1719            Example: `My new resource`
1720
1721        :param str lifecycle_state: (optional)
1722            A filter to return only resources that match the given lifecycle state.
1723
1724            Example: `ACTIVE` or `DELETED`
1725
1726            Allowed values are: "CREATING", "ACTIVE", "FAILED", "DELETING", "DELETED"
1727
1728        :param int limit: (optional)
1729            The maximum number of items to return.
1730
1731        :param str page: (optional)
1732            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
1733
1734        :param str sort_order: (optional)
1735            The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value.
1736
1737            Allowed values are: "ASC", "DESC"
1738
1739        :param str sort_by: (optional)
1740            The field to sort by. You can provide one sort order (`sortOrder`).
1741            Default order for `timeCreated` is descending. Default order for
1742            `displayName` is ascending. The `displayName` sort order is case
1743            sensitive.
1744
1745            Allowed values are: "timeCreated", "displayName"
1746
1747        :param str api_id: (optional)
1748            The ocid of the API.
1749
1750        :param str opc_request_id: (optional)
1751            The client request id for tracing.
1752
1753        :param obj retry_strategy: (optional)
1754            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1755
1756            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.
1757            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1758
1759            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1760
1761        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.SdkCollection`
1762        :rtype: :class:`~oci.response.Response`
1763
1764        :example:
1765        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/list_sdks.py.html>`__ to see an example of how to use list_sdks API.
1766        """
1767        resource_path = "/sdks"
1768        method = "GET"
1769
1770        # Don't accept unknown kwargs
1771        expected_kwargs = [
1772            "retry_strategy",
1773            "sdk_id",
1774            "display_name",
1775            "lifecycle_state",
1776            "limit",
1777            "page",
1778            "sort_order",
1779            "sort_by",
1780            "api_id",
1781            "opc_request_id"
1782        ]
1783        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1784        if extra_kwargs:
1785            raise ValueError(
1786                "list_sdks got unknown kwargs: {!r}".format(extra_kwargs))
1787
1788        if 'lifecycle_state' in kwargs:
1789            lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "DELETING", "DELETED"]
1790            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
1791                raise ValueError(
1792                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
1793                )
1794
1795        if 'sort_order' in kwargs:
1796            sort_order_allowed_values = ["ASC", "DESC"]
1797            if kwargs['sort_order'] not in sort_order_allowed_values:
1798                raise ValueError(
1799                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
1800                )
1801
1802        if 'sort_by' in kwargs:
1803            sort_by_allowed_values = ["timeCreated", "displayName"]
1804            if kwargs['sort_by'] not in sort_by_allowed_values:
1805                raise ValueError(
1806                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
1807                )
1808
1809        query_params = {
1810            "sdkId": kwargs.get("sdk_id", missing),
1811            "displayName": kwargs.get("display_name", missing),
1812            "lifecycleState": kwargs.get("lifecycle_state", missing),
1813            "limit": kwargs.get("limit", missing),
1814            "page": kwargs.get("page", missing),
1815            "sortOrder": kwargs.get("sort_order", missing),
1816            "sortBy": kwargs.get("sort_by", missing),
1817            "apiId": kwargs.get("api_id", missing)
1818        }
1819        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1820
1821        header_params = {
1822            "accept": "application/json",
1823            "content-type": "application/json",
1824            "opc-request-id": kwargs.get("opc_request_id", missing)
1825        }
1826        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1827
1828        retry_strategy = self.base_client.get_preferred_retry_strategy(
1829            operation_retry_strategy=kwargs.get('retry_strategy'),
1830            client_retry_strategy=self.retry_strategy
1831        )
1832
1833        if retry_strategy:
1834            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1835                self.base_client.add_opc_client_retries_header(header_params)
1836                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1837            return retry_strategy.make_retrying_call(
1838                self.base_client.call_api,
1839                resource_path=resource_path,
1840                method=method,
1841                query_params=query_params,
1842                header_params=header_params,
1843                response_type="SdkCollection")
1844        else:
1845            return self.base_client.call_api(
1846                resource_path=resource_path,
1847                method=method,
1848                query_params=query_params,
1849                header_params=header_params,
1850                response_type="SdkCollection")
1851
1852    def update_api(self, api_id, update_api_details, **kwargs):
1853        """
1854        Updates the API with the given identifier.
1855
1856
1857        :param str api_id: (required)
1858            The ocid of the API.
1859
1860        :param oci.apigateway.models.UpdateApiDetails update_api_details: (required)
1861            The information to be updated.
1862
1863        :param str if_match: (optional)
1864            For optimistic concurrency control. In the PUT or DELETE call
1865            for a resource, set the `if-match` parameter to the value of the
1866            etag from a previous GET or POST response for that resource.
1867            The resource will be updated or deleted only if the etag you
1868            provide matches the resource's current etag value.
1869
1870        :param str opc_request_id: (optional)
1871            The client request id for tracing.
1872
1873        :param obj retry_strategy: (optional)
1874            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1875
1876            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.
1877            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1878
1879            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1880
1881        :return: A :class:`~oci.response.Response` object with data of type None
1882        :rtype: :class:`~oci.response.Response`
1883
1884        :example:
1885        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/update_api.py.html>`__ to see an example of how to use update_api API.
1886        """
1887        resource_path = "/apis/{apiId}"
1888        method = "PUT"
1889
1890        # Don't accept unknown kwargs
1891        expected_kwargs = [
1892            "retry_strategy",
1893            "if_match",
1894            "opc_request_id"
1895        ]
1896        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1897        if extra_kwargs:
1898            raise ValueError(
1899                "update_api got unknown kwargs: {!r}".format(extra_kwargs))
1900
1901        path_params = {
1902            "apiId": api_id
1903        }
1904
1905        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1906
1907        for (k, v) in six.iteritems(path_params):
1908            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1909                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1910
1911        header_params = {
1912            "accept": "application/json",
1913            "content-type": "application/json",
1914            "if-match": kwargs.get("if_match", missing),
1915            "opc-request-id": kwargs.get("opc_request_id", missing)
1916        }
1917        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1918
1919        retry_strategy = self.base_client.get_preferred_retry_strategy(
1920            operation_retry_strategy=kwargs.get('retry_strategy'),
1921            client_retry_strategy=self.retry_strategy
1922        )
1923
1924        if retry_strategy:
1925            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1926                self.base_client.add_opc_client_retries_header(header_params)
1927                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1928            return retry_strategy.make_retrying_call(
1929                self.base_client.call_api,
1930                resource_path=resource_path,
1931                method=method,
1932                path_params=path_params,
1933                header_params=header_params,
1934                body=update_api_details)
1935        else:
1936            return self.base_client.call_api(
1937                resource_path=resource_path,
1938                method=method,
1939                path_params=path_params,
1940                header_params=header_params,
1941                body=update_api_details)
1942
1943    def update_certificate(self, certificate_id, update_certificate_details, **kwargs):
1944        """
1945        Updates a certificate with the given identifier
1946
1947
1948        :param str certificate_id: (required)
1949            The ocid of the certificate.
1950
1951        :param oci.apigateway.models.UpdateCertificateDetails update_certificate_details: (required)
1952            The information to be updated.
1953
1954        :param str if_match: (optional)
1955            For optimistic concurrency control. In the PUT or DELETE call
1956            for a resource, set the `if-match` parameter to the value of the
1957            etag from a previous GET or POST response for that resource.
1958            The resource will be updated or deleted only if the etag you
1959            provide matches the resource's current etag value.
1960
1961        :param str opc_request_id: (optional)
1962            The client request id for tracing.
1963
1964        :param obj retry_strategy: (optional)
1965            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1966
1967            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.
1968            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1969
1970            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1971
1972        :return: A :class:`~oci.response.Response` object with data of type None
1973        :rtype: :class:`~oci.response.Response`
1974
1975        :example:
1976        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/update_certificate.py.html>`__ to see an example of how to use update_certificate API.
1977        """
1978        resource_path = "/certificates/{certificateId}"
1979        method = "PUT"
1980
1981        # Don't accept unknown kwargs
1982        expected_kwargs = [
1983            "retry_strategy",
1984            "if_match",
1985            "opc_request_id"
1986        ]
1987        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1988        if extra_kwargs:
1989            raise ValueError(
1990                "update_certificate got unknown kwargs: {!r}".format(extra_kwargs))
1991
1992        path_params = {
1993            "certificateId": certificate_id
1994        }
1995
1996        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1997
1998        for (k, v) in six.iteritems(path_params):
1999            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2000                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2001
2002        header_params = {
2003            "accept": "application/json",
2004            "content-type": "application/json",
2005            "if-match": kwargs.get("if_match", missing),
2006            "opc-request-id": kwargs.get("opc_request_id", missing)
2007        }
2008        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2009
2010        retry_strategy = self.base_client.get_preferred_retry_strategy(
2011            operation_retry_strategy=kwargs.get('retry_strategy'),
2012            client_retry_strategy=self.retry_strategy
2013        )
2014
2015        if retry_strategy:
2016            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2017                self.base_client.add_opc_client_retries_header(header_params)
2018                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2019            return retry_strategy.make_retrying_call(
2020                self.base_client.call_api,
2021                resource_path=resource_path,
2022                method=method,
2023                path_params=path_params,
2024                header_params=header_params,
2025                body=update_certificate_details)
2026        else:
2027            return self.base_client.call_api(
2028                resource_path=resource_path,
2029                method=method,
2030                path_params=path_params,
2031                header_params=header_params,
2032                body=update_certificate_details)
2033
2034    def update_sdk(self, sdk_id, update_sdk_details, **kwargs):
2035        """
2036        Updates the SDK with the given identifier.
2037
2038
2039        :param str sdk_id: (required)
2040            The ocid of the SDK.
2041
2042        :param oci.apigateway.models.UpdateSdkDetails update_sdk_details: (required)
2043            The information to be updated.
2044
2045        :param str if_match: (optional)
2046            For optimistic concurrency control. In the PUT or DELETE call
2047            for a resource, set the `if-match` parameter to the value of the
2048            etag from a previous GET or POST response for that resource.
2049            The resource will be updated or deleted only if the etag you
2050            provide matches the resource's current etag value.
2051
2052        :param str opc_request_id: (optional)
2053            The client request id for tracing.
2054
2055        :param obj retry_strategy: (optional)
2056            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2057
2058            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.
2059            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2060
2061            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2062
2063        :return: A :class:`~oci.response.Response` object with data of type None
2064        :rtype: :class:`~oci.response.Response`
2065
2066        :example:
2067        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/apigateway/update_sdk.py.html>`__ to see an example of how to use update_sdk API.
2068        """
2069        resource_path = "/sdks/{sdkId}"
2070        method = "PUT"
2071
2072        # Don't accept unknown kwargs
2073        expected_kwargs = [
2074            "retry_strategy",
2075            "if_match",
2076            "opc_request_id"
2077        ]
2078        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2079        if extra_kwargs:
2080            raise ValueError(
2081                "update_sdk got unknown kwargs: {!r}".format(extra_kwargs))
2082
2083        path_params = {
2084            "sdkId": sdk_id
2085        }
2086
2087        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2088
2089        for (k, v) in six.iteritems(path_params):
2090            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2091                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2092
2093        header_params = {
2094            "accept": "application/json",
2095            "content-type": "application/json",
2096            "if-match": kwargs.get("if_match", missing),
2097            "opc-request-id": kwargs.get("opc_request_id", missing)
2098        }
2099        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2100
2101        retry_strategy = self.base_client.get_preferred_retry_strategy(
2102            operation_retry_strategy=kwargs.get('retry_strategy'),
2103            client_retry_strategy=self.retry_strategy
2104        )
2105
2106        if retry_strategy:
2107            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2108                self.base_client.add_opc_client_retries_header(header_params)
2109                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2110            return retry_strategy.make_retrying_call(
2111                self.base_client.call_api,
2112                resource_path=resource_path,
2113                method=method,
2114                path_params=path_params,
2115                header_params=header_params,
2116                body=update_sdk_details)
2117        else:
2118            return self.base_client.call_api(
2119                resource_path=resource_path,
2120                method=method,
2121                path_params=path_params,
2122                header_params=header_params,
2123                body=update_sdk_details)
2124