1# coding: utf-8 2# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. 3# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. 4 5from __future__ import absolute_import 6 7from oci._vendor import requests # noqa: F401 8from oci._vendor import six 9 10from oci import retry, circuit_breaker # noqa: F401 11from oci.base_client import BaseClient 12from oci.config import get_config_value_or_default, validate_config 13from oci.signer import Signer 14from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME 15from .models import core_type_mapping 16missing = Sentinel("Missing") 17 18 19class VirtualNetworkClient(object): 20 """ 21 Use the Core Services API to manage resources such as virtual cloud networks (VCNs), 22 compute instances, and block storage volumes. For more information, see the console 23 documentation for the [Networking](/iaas/Content/Network/Concepts/overview.htm), 24 [Compute](/iaas/Content/Compute/Concepts/computeoverview.htm), and 25 [Block Volume](/iaas/Content/Block/Concepts/overview.htm) services. 26 """ 27 28 def __init__(self, config, **kwargs): 29 """ 30 Creates a new service client 31 32 :param dict config: 33 Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__. 34 The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config 35 the dict using :py:meth:`~oci.config.validate_config` 36 37 :param str service_endpoint: (optional) 38 The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is 39 not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit 40 need to specify a service endpoint. 41 42 :param timeout: (optional) 43 The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided 44 as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If 45 a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout. 46 :type timeout: float or tuple(float, float) 47 48 :param signer: (optional) 49 The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values 50 provided in the config parameter. 51 52 One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__ 53 by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument 54 :type signer: :py:class:`~oci.signer.AbstractBaseSigner` 55 56 :param obj retry_strategy: (optional) 57 A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. 58 Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation. 59 Any value provided at the operation level will override whatever is specified at the client level. 60 61 This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` 62 is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 63 64 :param obj circuit_breaker_strategy: (optional) 65 A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). 66 This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided. 67 The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__. 68 69 :param function circuit_breaker_callback: (optional) 70 Callback function to receive any exceptions triggerred by the circuit breaker. 71 """ 72 validate_config(config, signer=kwargs.get('signer')) 73 if 'signer' in kwargs: 74 signer = kwargs['signer'] 75 76 elif AUTHENTICATION_TYPE_FIELD_NAME in config: 77 signer = get_signer_from_authentication_type(config) 78 79 else: 80 signer = Signer( 81 tenancy=config["tenancy"], 82 user=config["user"], 83 fingerprint=config["fingerprint"], 84 private_key_file_location=config.get("key_file"), 85 pass_phrase=get_config_value_or_default(config, "pass_phrase"), 86 private_key_content=config.get("key_content") 87 ) 88 89 base_client_init_kwargs = { 90 'regional_client': True, 91 'service_endpoint': kwargs.get('service_endpoint'), 92 'base_path': '/20160918', 93 'service_endpoint_template': 'https://iaas.{region}.{secondLevelDomain}', 94 'skip_deserialization': kwargs.get('skip_deserialization', False), 95 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) 96 } 97 if 'timeout' in kwargs: 98 base_client_init_kwargs['timeout'] = kwargs.get('timeout') 99 if base_client_init_kwargs.get('circuit_breaker_strategy') is None: 100 base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY 101 self.base_client = BaseClient("virtual_network", config, signer, core_type_mapping, **base_client_init_kwargs) 102 self.retry_strategy = kwargs.get('retry_strategy') 103 self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') 104 self._config = config 105 self._kwargs = kwargs 106 107 def add_drg_route_distribution_statements(self, drg_route_distribution_id, add_drg_route_distribution_statements_details, **kwargs): 108 """ 109 Adds one or more route distribution statements to the specified route distribution. 110 111 112 :param str drg_route_distribution_id: (required) 113 The `OCID`__ of the route distribution. 114 115 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 116 117 :param oci.core.models.AddDrgRouteDistributionStatementsDetails add_drg_route_distribution_statements_details: (required) 118 Request with one or more route distribution statements to be inserted into the route distribution. 119 120 :param obj retry_strategy: (optional) 121 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 122 123 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. 124 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 125 126 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 127 128 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgRouteDistributionStatement` 129 :rtype: :class:`~oci.response.Response` 130 131 :example: 132 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/add_drg_route_distribution_statements.py.html>`__ to see an example of how to use add_drg_route_distribution_statements API. 133 """ 134 resource_path = "/drgRouteDistributions/{drgRouteDistributionId}/actions/addDrgRouteDistributionStatements" 135 method = "POST" 136 137 expected_kwargs = ["retry_strategy"] 138 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 139 if extra_kwargs: 140 raise ValueError( 141 "add_drg_route_distribution_statements got unknown kwargs: {!r}".format(extra_kwargs)) 142 143 path_params = { 144 "drgRouteDistributionId": drg_route_distribution_id 145 } 146 147 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 148 149 for (k, v) in six.iteritems(path_params): 150 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 151 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 152 153 header_params = { 154 "accept": "application/json", 155 "content-type": "application/json" 156 } 157 158 retry_strategy = self.base_client.get_preferred_retry_strategy( 159 operation_retry_strategy=kwargs.get('retry_strategy'), 160 client_retry_strategy=self.retry_strategy 161 ) 162 163 if retry_strategy: 164 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 165 self.base_client.add_opc_client_retries_header(header_params) 166 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 167 return retry_strategy.make_retrying_call( 168 self.base_client.call_api, 169 resource_path=resource_path, 170 method=method, 171 path_params=path_params, 172 header_params=header_params, 173 body=add_drg_route_distribution_statements_details, 174 response_type="list[DrgRouteDistributionStatement]") 175 else: 176 return self.base_client.call_api( 177 resource_path=resource_path, 178 method=method, 179 path_params=path_params, 180 header_params=header_params, 181 body=add_drg_route_distribution_statements_details, 182 response_type="list[DrgRouteDistributionStatement]") 183 184 def add_drg_route_rules(self, drg_route_table_id, add_drg_route_rules_details, **kwargs): 185 """ 186 Adds one or more static route rules to the specified DRG route table. 187 188 189 :param str drg_route_table_id: (required) 190 The `OCID`__ of the DRG route table. 191 192 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 193 194 :param oci.core.models.AddDrgRouteRulesDetails add_drg_route_rules_details: (required) 195 Request for one or more route rules to be inserted into the DRG route table. 196 197 :param str opc_retry_token: (optional) 198 A token that uniquely identifies a request so it can be retried in case of a timeout or 199 server error without risk of executing that same action again. Retry tokens expire after 24 200 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 201 has been deleted and purged from the system, then a retry of the original creation request 202 may be rejected). 203 204 :param obj retry_strategy: (optional) 205 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 206 207 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. 208 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 209 210 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 211 212 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgRouteRule` 213 :rtype: :class:`~oci.response.Response` 214 215 :example: 216 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/add_drg_route_rules.py.html>`__ to see an example of how to use add_drg_route_rules API. 217 """ 218 resource_path = "/drgRouteTables/{drgRouteTableId}/actions/addDrgRouteRules" 219 method = "POST" 220 221 # Don't accept unknown kwargs 222 expected_kwargs = [ 223 "retry_strategy", 224 "opc_retry_token" 225 ] 226 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 227 if extra_kwargs: 228 raise ValueError( 229 "add_drg_route_rules got unknown kwargs: {!r}".format(extra_kwargs)) 230 231 path_params = { 232 "drgRouteTableId": drg_route_table_id 233 } 234 235 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 236 237 for (k, v) in six.iteritems(path_params): 238 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 239 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 240 241 header_params = { 242 "accept": "application/json", 243 "content-type": "application/json", 244 "opc-retry-token": kwargs.get("opc_retry_token", missing) 245 } 246 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 247 248 retry_strategy = self.base_client.get_preferred_retry_strategy( 249 operation_retry_strategy=kwargs.get('retry_strategy'), 250 client_retry_strategy=self.retry_strategy 251 ) 252 253 if retry_strategy: 254 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 255 self.base_client.add_opc_retry_token_if_needed(header_params) 256 self.base_client.add_opc_client_retries_header(header_params) 257 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 258 return retry_strategy.make_retrying_call( 259 self.base_client.call_api, 260 resource_path=resource_path, 261 method=method, 262 path_params=path_params, 263 header_params=header_params, 264 body=add_drg_route_rules_details, 265 response_type="list[DrgRouteRule]") 266 else: 267 return self.base_client.call_api( 268 resource_path=resource_path, 269 method=method, 270 path_params=path_params, 271 header_params=header_params, 272 body=add_drg_route_rules_details, 273 response_type="list[DrgRouteRule]") 274 275 def add_ipv6_vcn_cidr(self, vcn_id, **kwargs): 276 """ 277 Add an IPv6 CIDR to a VCN. The VCN size is always /56 and assigned by Oracle. 278 Once added the IPv6 CIDR block cannot be removed or modified. 279 280 281 :param str vcn_id: (required) 282 The `OCID`__ of the VCN. 283 284 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 285 286 :param str opc_request_id: (optional) 287 Unique identifier for the request. 288 If you need to contact Oracle about a particular request, please provide the request ID. 289 290 :param str opc_retry_token: (optional) 291 A token that uniquely identifies a request so it can be retried in case of a timeout or 292 server error without risk of executing that same action again. Retry tokens expire after 24 293 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 294 has been deleted and purged from the system, then a retry of the original creation request 295 may be rejected). 296 297 :param str if_match: (optional) 298 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 299 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 300 will be updated or deleted only if the etag you provide matches the resource's current etag value. 301 302 :param obj retry_strategy: (optional) 303 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 304 305 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 306 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 307 308 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 309 310 :return: A :class:`~oci.response.Response` object with data of type None 311 :rtype: :class:`~oci.response.Response` 312 313 :example: 314 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/add_ipv6_vcn_cidr.py.html>`__ to see an example of how to use add_ipv6_vcn_cidr API. 315 """ 316 resource_path = "/vcns/{vcnId}/actions/addIpv6Cidr" 317 method = "POST" 318 319 # Don't accept unknown kwargs 320 expected_kwargs = [ 321 "retry_strategy", 322 "opc_request_id", 323 "opc_retry_token", 324 "if_match" 325 ] 326 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 327 if extra_kwargs: 328 raise ValueError( 329 "add_ipv6_vcn_cidr got unknown kwargs: {!r}".format(extra_kwargs)) 330 331 path_params = { 332 "vcnId": vcn_id 333 } 334 335 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 336 337 for (k, v) in six.iteritems(path_params): 338 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 339 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 340 341 header_params = { 342 "accept": "application/json", 343 "content-type": "application/json", 344 "opc-request-id": kwargs.get("opc_request_id", missing), 345 "opc-retry-token": kwargs.get("opc_retry_token", missing), 346 "if-match": kwargs.get("if_match", missing) 347 } 348 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 349 350 retry_strategy = self.base_client.get_preferred_retry_strategy( 351 operation_retry_strategy=kwargs.get('retry_strategy'), 352 client_retry_strategy=self.retry_strategy 353 ) 354 355 if retry_strategy: 356 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 357 self.base_client.add_opc_retry_token_if_needed(header_params) 358 self.base_client.add_opc_client_retries_header(header_params) 359 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 360 return retry_strategy.make_retrying_call( 361 self.base_client.call_api, 362 resource_path=resource_path, 363 method=method, 364 path_params=path_params, 365 header_params=header_params) 366 else: 367 return self.base_client.call_api( 368 resource_path=resource_path, 369 method=method, 370 path_params=path_params, 371 header_params=header_params) 372 373 def add_network_security_group_security_rules(self, network_security_group_id, add_network_security_group_security_rules_details, **kwargs): 374 """ 375 Adds one or more security rules to the specified network security group. 376 377 378 :param str network_security_group_id: (required) 379 The `OCID`__ of the network security group. 380 381 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 382 383 :param oci.core.models.AddNetworkSecurityGroupSecurityRulesDetails add_network_security_group_security_rules_details: (required) 384 Request with one or more security rules to be associated with the network security group. 385 386 :param obj retry_strategy: (optional) 387 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 388 389 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. 390 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 391 392 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 393 394 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.AddedNetworkSecurityGroupSecurityRules` 395 :rtype: :class:`~oci.response.Response` 396 397 :example: 398 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/add_network_security_group_security_rules.py.html>`__ to see an example of how to use add_network_security_group_security_rules API. 399 """ 400 resource_path = "/networkSecurityGroups/{networkSecurityGroupId}/actions/addSecurityRules" 401 method = "POST" 402 403 expected_kwargs = ["retry_strategy"] 404 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 405 if extra_kwargs: 406 raise ValueError( 407 "add_network_security_group_security_rules got unknown kwargs: {!r}".format(extra_kwargs)) 408 409 path_params = { 410 "networkSecurityGroupId": network_security_group_id 411 } 412 413 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 414 415 for (k, v) in six.iteritems(path_params): 416 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 417 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 418 419 header_params = { 420 "accept": "application/json", 421 "content-type": "application/json" 422 } 423 424 retry_strategy = self.base_client.get_preferred_retry_strategy( 425 operation_retry_strategy=kwargs.get('retry_strategy'), 426 client_retry_strategy=self.retry_strategy 427 ) 428 429 if retry_strategy: 430 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 431 self.base_client.add_opc_client_retries_header(header_params) 432 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 433 return retry_strategy.make_retrying_call( 434 self.base_client.call_api, 435 resource_path=resource_path, 436 method=method, 437 path_params=path_params, 438 header_params=header_params, 439 body=add_network_security_group_security_rules_details, 440 response_type="AddedNetworkSecurityGroupSecurityRules") 441 else: 442 return self.base_client.call_api( 443 resource_path=resource_path, 444 method=method, 445 path_params=path_params, 446 header_params=header_params, 447 body=add_network_security_group_security_rules_details, 448 response_type="AddedNetworkSecurityGroupSecurityRules") 449 450 def add_public_ip_pool_capacity(self, public_ip_pool_id, add_public_ip_pool_capacity_details, **kwargs): 451 """ 452 Adds some or all of a CIDR block to a public IP pool. 453 454 The CIDR block (or subrange) must not overlap with any other CIDR block already added to this or any other public IP pool. 455 456 457 :param str public_ip_pool_id: (required) 458 The `OCID`__ of the public IP pool. 459 460 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 461 462 :param oci.core.models.AddPublicIpPoolCapacityDetails add_public_ip_pool_capacity_details: (required) 463 Byoip Range prefix and a cidr from it 464 465 :param str opc_request_id: (optional) 466 Unique identifier for the request. 467 If you need to contact Oracle about a particular request, please provide the request ID. 468 469 :param str opc_retry_token: (optional) 470 A token that uniquely identifies a request so it can be retried in case of a timeout or 471 server error without risk of executing that same action again. Retry tokens expire after 24 472 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 473 has been deleted and purged from the system, then a retry of the original creation request 474 may be rejected). 475 476 :param obj retry_strategy: (optional) 477 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 478 479 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. 480 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 481 482 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 483 484 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` 485 :rtype: :class:`~oci.response.Response` 486 487 :example: 488 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/add_public_ip_pool_capacity.py.html>`__ to see an example of how to use add_public_ip_pool_capacity API. 489 """ 490 resource_path = "/publicIpPools/{publicIpPoolId}/actions/addCapacity" 491 method = "POST" 492 493 # Don't accept unknown kwargs 494 expected_kwargs = [ 495 "retry_strategy", 496 "opc_request_id", 497 "opc_retry_token" 498 ] 499 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 500 if extra_kwargs: 501 raise ValueError( 502 "add_public_ip_pool_capacity got unknown kwargs: {!r}".format(extra_kwargs)) 503 504 path_params = { 505 "publicIpPoolId": public_ip_pool_id 506 } 507 508 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 509 510 for (k, v) in six.iteritems(path_params): 511 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 512 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 513 514 header_params = { 515 "accept": "application/json", 516 "content-type": "application/json", 517 "opc-request-id": kwargs.get("opc_request_id", missing), 518 "opc-retry-token": kwargs.get("opc_retry_token", missing) 519 } 520 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 521 522 retry_strategy = self.base_client.get_preferred_retry_strategy( 523 operation_retry_strategy=kwargs.get('retry_strategy'), 524 client_retry_strategy=self.retry_strategy 525 ) 526 527 if retry_strategy: 528 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 529 self.base_client.add_opc_retry_token_if_needed(header_params) 530 self.base_client.add_opc_client_retries_header(header_params) 531 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 532 return retry_strategy.make_retrying_call( 533 self.base_client.call_api, 534 resource_path=resource_path, 535 method=method, 536 path_params=path_params, 537 header_params=header_params, 538 body=add_public_ip_pool_capacity_details, 539 response_type="PublicIpPool") 540 else: 541 return self.base_client.call_api( 542 resource_path=resource_path, 543 method=method, 544 path_params=path_params, 545 header_params=header_params, 546 body=add_public_ip_pool_capacity_details, 547 response_type="PublicIpPool") 548 549 def add_vcn_cidr(self, vcn_id, add_vcn_cidr_details, **kwargs): 550 """ 551 Adds a CIDR block to a VCN. The CIDR block you add: 552 553 - Must be valid. 554 - Must not overlap with another CIDR block in the VCN, a CIDR block of a peered VCN, or the on-premises network CIDR block. 555 - Must not exceed the limit of CIDR blocks allowed per VCN. 556 557 **Note:** Adding a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can take a few minutes. You can use the `GetWorkRequest` operation to check the status of the update. 558 559 560 :param str vcn_id: (required) 561 The `OCID`__ of the VCN. 562 563 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 564 565 :param oci.core.models.AddVcnCidrDetails add_vcn_cidr_details: (required) 566 Details object for deleting a VCN CIDR. 567 568 :param str opc_request_id: (optional) 569 Unique identifier for the request. 570 If you need to contact Oracle about a particular request, please provide the request ID. 571 572 :param str opc_retry_token: (optional) 573 A token that uniquely identifies a request so it can be retried in case of a timeout or 574 server error without risk of executing that same action again. Retry tokens expire after 24 575 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 576 has been deleted and purged from the system, then a retry of the original creation request 577 may be rejected). 578 579 :param str if_match: (optional) 580 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 581 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 582 will be updated or deleted only if the etag you provide matches the resource's current etag value. 583 584 :param obj retry_strategy: (optional) 585 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 586 587 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. 588 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 589 590 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 591 592 :return: A :class:`~oci.response.Response` object with data of type None 593 :rtype: :class:`~oci.response.Response` 594 595 :example: 596 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/add_vcn_cidr.py.html>`__ to see an example of how to use add_vcn_cidr API. 597 """ 598 resource_path = "/vcns/{vcnId}/actions/addCidr" 599 method = "POST" 600 601 # Don't accept unknown kwargs 602 expected_kwargs = [ 603 "retry_strategy", 604 "opc_request_id", 605 "opc_retry_token", 606 "if_match" 607 ] 608 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 609 if extra_kwargs: 610 raise ValueError( 611 "add_vcn_cidr got unknown kwargs: {!r}".format(extra_kwargs)) 612 613 path_params = { 614 "vcnId": vcn_id 615 } 616 617 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 618 619 for (k, v) in six.iteritems(path_params): 620 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 621 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 622 623 header_params = { 624 "accept": "application/json", 625 "content-type": "application/json", 626 "opc-request-id": kwargs.get("opc_request_id", missing), 627 "opc-retry-token": kwargs.get("opc_retry_token", missing), 628 "if-match": kwargs.get("if_match", missing) 629 } 630 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 631 632 retry_strategy = self.base_client.get_preferred_retry_strategy( 633 operation_retry_strategy=kwargs.get('retry_strategy'), 634 client_retry_strategy=self.retry_strategy 635 ) 636 637 if retry_strategy: 638 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 639 self.base_client.add_opc_retry_token_if_needed(header_params) 640 self.base_client.add_opc_client_retries_header(header_params) 641 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 642 return retry_strategy.make_retrying_call( 643 self.base_client.call_api, 644 resource_path=resource_path, 645 method=method, 646 path_params=path_params, 647 header_params=header_params, 648 body=add_vcn_cidr_details) 649 else: 650 return self.base_client.call_api( 651 resource_path=resource_path, 652 method=method, 653 path_params=path_params, 654 header_params=header_params, 655 body=add_vcn_cidr_details) 656 657 def advertise_byoip_range(self, byoip_range_id, **kwargs): 658 """ 659 Begins BGP route advertisements for the BYOIP CIDR block you imported to the Oracle Cloud. 660 The `ByoipRange` resource must be in the PROVISIONED state before the BYOIP CIDR block routes can be advertised with BGP. 661 662 663 :param str byoip_range_id: (required) 664 The `OCID`__ of the `ByoipRange` resource containing the BYOIP CIDR block. 665 666 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 667 668 :param str opc_request_id: (optional) 669 Unique identifier for the request. 670 If you need to contact Oracle about a particular request, please provide the request ID. 671 672 :param obj retry_strategy: (optional) 673 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 674 675 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. 676 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 677 678 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 679 680 :return: A :class:`~oci.response.Response` object with data of type None 681 :rtype: :class:`~oci.response.Response` 682 683 :example: 684 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/advertise_byoip_range.py.html>`__ to see an example of how to use advertise_byoip_range API. 685 """ 686 resource_path = "/byoipRanges/{byoipRangeId}/actions/advertise" 687 method = "POST" 688 689 # Don't accept unknown kwargs 690 expected_kwargs = [ 691 "retry_strategy", 692 "opc_request_id" 693 ] 694 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 695 if extra_kwargs: 696 raise ValueError( 697 "advertise_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) 698 699 path_params = { 700 "byoipRangeId": byoip_range_id 701 } 702 703 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 704 705 for (k, v) in six.iteritems(path_params): 706 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 707 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 708 709 header_params = { 710 "accept": "application/json", 711 "content-type": "application/json", 712 "opc-request-id": kwargs.get("opc_request_id", missing) 713 } 714 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 715 716 retry_strategy = self.base_client.get_preferred_retry_strategy( 717 operation_retry_strategy=kwargs.get('retry_strategy'), 718 client_retry_strategy=self.retry_strategy 719 ) 720 721 if retry_strategy: 722 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 723 self.base_client.add_opc_client_retries_header(header_params) 724 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 725 return retry_strategy.make_retrying_call( 726 self.base_client.call_api, 727 resource_path=resource_path, 728 method=method, 729 path_params=path_params, 730 header_params=header_params) 731 else: 732 return self.base_client.call_api( 733 resource_path=resource_path, 734 method=method, 735 path_params=path_params, 736 header_params=header_params) 737 738 def attach_service_id(self, service_gateway_id, attach_service_details, **kwargs): 739 """ 740 Adds the specified :class:`Service` to the list of enabled 741 `Service` objects for the specified gateway. You must also set up a route rule with the 742 `cidrBlock` of the `Service` as the rule's destination and the service gateway as the rule's 743 target. See :class:`RouteTable`. 744 745 **Note:** The `AttachServiceId` operation is an easy way to add an individual `Service` to 746 the service gateway. Compare it with 747 :func:`update_service_gateway`, which replaces 748 the entire existing list of enabled `Service` objects with the list that you provide in the 749 `Update` call. 750 751 752 :param str service_gateway_id: (required) 753 The service gateway's `OCID`__. 754 755 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 756 757 :param oci.core.models.ServiceIdRequestDetails attach_service_details: (required) 758 ServiceId of Service to be attached to a service gateway. 759 760 :param str if_match: (optional) 761 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 762 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 763 will be updated or deleted only if the etag you provide matches the resource's current etag value. 764 765 :param obj retry_strategy: (optional) 766 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 767 768 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. 769 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 770 771 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 772 773 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ServiceGateway` 774 :rtype: :class:`~oci.response.Response` 775 776 :example: 777 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/attach_service_id.py.html>`__ to see an example of how to use attach_service_id API. 778 """ 779 resource_path = "/serviceGateways/{serviceGatewayId}/actions/attachService" 780 method = "POST" 781 782 # Don't accept unknown kwargs 783 expected_kwargs = [ 784 "retry_strategy", 785 "if_match" 786 ] 787 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 788 if extra_kwargs: 789 raise ValueError( 790 "attach_service_id got unknown kwargs: {!r}".format(extra_kwargs)) 791 792 path_params = { 793 "serviceGatewayId": service_gateway_id 794 } 795 796 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 797 798 for (k, v) in six.iteritems(path_params): 799 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 800 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 801 802 header_params = { 803 "accept": "application/json", 804 "content-type": "application/json", 805 "if-match": kwargs.get("if_match", missing) 806 } 807 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 808 809 retry_strategy = self.base_client.get_preferred_retry_strategy( 810 operation_retry_strategy=kwargs.get('retry_strategy'), 811 client_retry_strategy=self.retry_strategy 812 ) 813 814 if retry_strategy: 815 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 816 self.base_client.add_opc_client_retries_header(header_params) 817 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 818 return retry_strategy.make_retrying_call( 819 self.base_client.call_api, 820 resource_path=resource_path, 821 method=method, 822 path_params=path_params, 823 header_params=header_params, 824 body=attach_service_details, 825 response_type="ServiceGateway") 826 else: 827 return self.base_client.call_api( 828 resource_path=resource_path, 829 method=method, 830 path_params=path_params, 831 header_params=header_params, 832 body=attach_service_details, 833 response_type="ServiceGateway") 834 835 def bulk_add_virtual_circuit_public_prefixes(self, virtual_circuit_id, bulk_add_virtual_circuit_public_prefixes_details, **kwargs): 836 """ 837 Adds one or more customer public IP prefixes to the specified public virtual circuit. 838 Use this operation (and not :func:`update_virtual_circuit`) 839 to add prefixes to the virtual circuit. Oracle must verify the customer's ownership 840 of each prefix before traffic for that prefix will flow across the virtual circuit. 841 842 843 :param str virtual_circuit_id: (required) 844 The `OCID`__ of the virtual circuit. 845 846 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 847 848 :param oci.core.models.BulkAddVirtualCircuitPublicPrefixesDetails bulk_add_virtual_circuit_public_prefixes_details: (required) 849 Request with publix prefixes to be added to the virtual circuit 850 851 :param obj retry_strategy: (optional) 852 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 853 854 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. 855 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 856 857 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 858 859 :return: A :class:`~oci.response.Response` object with data of type None 860 :rtype: :class:`~oci.response.Response` 861 862 :example: 863 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/bulk_add_virtual_circuit_public_prefixes.py.html>`__ to see an example of how to use bulk_add_virtual_circuit_public_prefixes API. 864 """ 865 resource_path = "/virtualCircuits/{virtualCircuitId}/actions/bulkAddPublicPrefixes" 866 method = "POST" 867 868 expected_kwargs = ["retry_strategy"] 869 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 870 if extra_kwargs: 871 raise ValueError( 872 "bulk_add_virtual_circuit_public_prefixes got unknown kwargs: {!r}".format(extra_kwargs)) 873 874 path_params = { 875 "virtualCircuitId": virtual_circuit_id 876 } 877 878 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 879 880 for (k, v) in six.iteritems(path_params): 881 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 882 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 883 884 header_params = { 885 "accept": "application/json", 886 "content-type": "application/json" 887 } 888 889 retry_strategy = self.base_client.get_preferred_retry_strategy( 890 operation_retry_strategy=kwargs.get('retry_strategy'), 891 client_retry_strategy=self.retry_strategy 892 ) 893 894 if retry_strategy: 895 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 896 self.base_client.add_opc_client_retries_header(header_params) 897 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 898 return retry_strategy.make_retrying_call( 899 self.base_client.call_api, 900 resource_path=resource_path, 901 method=method, 902 path_params=path_params, 903 header_params=header_params, 904 body=bulk_add_virtual_circuit_public_prefixes_details) 905 else: 906 return self.base_client.call_api( 907 resource_path=resource_path, 908 method=method, 909 path_params=path_params, 910 header_params=header_params, 911 body=bulk_add_virtual_circuit_public_prefixes_details) 912 913 def bulk_delete_virtual_circuit_public_prefixes(self, virtual_circuit_id, bulk_delete_virtual_circuit_public_prefixes_details, **kwargs): 914 """ 915 Removes one or more customer public IP prefixes from the specified public virtual circuit. 916 Use this operation (and not :func:`update_virtual_circuit`) 917 to remove prefixes from the virtual circuit. When the virtual circuit's state switches 918 back to PROVISIONED, Oracle stops advertising the specified prefixes across the connection. 919 920 921 :param str virtual_circuit_id: (required) 922 The `OCID`__ of the virtual circuit. 923 924 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 925 926 :param oci.core.models.BulkDeleteVirtualCircuitPublicPrefixesDetails bulk_delete_virtual_circuit_public_prefixes_details: (required) 927 Request with public prefixes to be deleted from the virtual circuit. 928 929 :param obj retry_strategy: (optional) 930 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 931 932 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. 933 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 934 935 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 936 937 :return: A :class:`~oci.response.Response` object with data of type None 938 :rtype: :class:`~oci.response.Response` 939 940 :example: 941 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/bulk_delete_virtual_circuit_public_prefixes.py.html>`__ to see an example of how to use bulk_delete_virtual_circuit_public_prefixes API. 942 """ 943 resource_path = "/virtualCircuits/{virtualCircuitId}/actions/bulkDeletePublicPrefixes" 944 method = "POST" 945 946 expected_kwargs = ["retry_strategy"] 947 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 948 if extra_kwargs: 949 raise ValueError( 950 "bulk_delete_virtual_circuit_public_prefixes got unknown kwargs: {!r}".format(extra_kwargs)) 951 952 path_params = { 953 "virtualCircuitId": virtual_circuit_id 954 } 955 956 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 957 958 for (k, v) in six.iteritems(path_params): 959 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 960 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 961 962 header_params = { 963 "accept": "application/json", 964 "content-type": "application/json" 965 } 966 967 retry_strategy = self.base_client.get_preferred_retry_strategy( 968 operation_retry_strategy=kwargs.get('retry_strategy'), 969 client_retry_strategy=self.retry_strategy 970 ) 971 972 if retry_strategy: 973 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 974 self.base_client.add_opc_client_retries_header(header_params) 975 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 976 return retry_strategy.make_retrying_call( 977 self.base_client.call_api, 978 resource_path=resource_path, 979 method=method, 980 path_params=path_params, 981 header_params=header_params, 982 body=bulk_delete_virtual_circuit_public_prefixes_details) 983 else: 984 return self.base_client.call_api( 985 resource_path=resource_path, 986 method=method, 987 path_params=path_params, 988 header_params=header_params, 989 body=bulk_delete_virtual_circuit_public_prefixes_details) 990 991 def change_byoip_range_compartment(self, byoip_range_id, change_byoip_range_compartment_details, **kwargs): 992 """ 993 Moves a BYOIP CIDR block to a different compartment. For information 994 about moving resources between compartments, see 995 `Moving Resources to a Different Compartment`__. 996 997 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 998 999 1000 :param str byoip_range_id: (required) 1001 The `OCID`__ of the `ByoipRange` resource containing the BYOIP CIDR block. 1002 1003 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 1004 1005 :param oci.core.models.ChangeByoipRangeCompartmentDetails change_byoip_range_compartment_details: (required) 1006 Request to change the compartment of a BYOIP CIDR block. 1007 1008 :param str opc_request_id: (optional) 1009 Unique identifier for the request. 1010 If you need to contact Oracle about a particular request, please provide the request ID. 1011 1012 :param str opc_retry_token: (optional) 1013 A token that uniquely identifies a request so it can be retried in case of a timeout or 1014 server error without risk of executing that same action again. Retry tokens expire after 24 1015 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1016 has been deleted and purged from the system, then a retry of the original creation request 1017 may be rejected). 1018 1019 :param obj retry_strategy: (optional) 1020 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1021 1022 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. 1023 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1024 1025 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1026 1027 :return: A :class:`~oci.response.Response` object with data of type None 1028 :rtype: :class:`~oci.response.Response` 1029 1030 :example: 1031 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_byoip_range_compartment.py.html>`__ to see an example of how to use change_byoip_range_compartment API. 1032 """ 1033 resource_path = "/byoipRanges/{byoipRangeId}/actions/changeCompartment" 1034 method = "POST" 1035 1036 # Don't accept unknown kwargs 1037 expected_kwargs = [ 1038 "retry_strategy", 1039 "opc_request_id", 1040 "opc_retry_token" 1041 ] 1042 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1043 if extra_kwargs: 1044 raise ValueError( 1045 "change_byoip_range_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1046 1047 path_params = { 1048 "byoipRangeId": byoip_range_id 1049 } 1050 1051 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1052 1053 for (k, v) in six.iteritems(path_params): 1054 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1055 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1056 1057 header_params = { 1058 "accept": "application/json", 1059 "content-type": "application/json", 1060 "opc-request-id": kwargs.get("opc_request_id", missing), 1061 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1062 } 1063 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1064 1065 retry_strategy = self.base_client.get_preferred_retry_strategy( 1066 operation_retry_strategy=kwargs.get('retry_strategy'), 1067 client_retry_strategy=self.retry_strategy 1068 ) 1069 1070 if retry_strategy: 1071 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1072 self.base_client.add_opc_retry_token_if_needed(header_params) 1073 self.base_client.add_opc_client_retries_header(header_params) 1074 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1075 return retry_strategy.make_retrying_call( 1076 self.base_client.call_api, 1077 resource_path=resource_path, 1078 method=method, 1079 path_params=path_params, 1080 header_params=header_params, 1081 body=change_byoip_range_compartment_details) 1082 else: 1083 return self.base_client.call_api( 1084 resource_path=resource_path, 1085 method=method, 1086 path_params=path_params, 1087 header_params=header_params, 1088 body=change_byoip_range_compartment_details) 1089 1090 def change_cpe_compartment(self, cpe_id, change_cpe_compartment_details, **kwargs): 1091 """ 1092 Moves a CPE object into a different compartment within the same tenancy. For information 1093 about moving resources between compartments, see 1094 `Moving Resources to a Different Compartment`__. 1095 1096 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1097 1098 1099 :param str cpe_id: (required) 1100 The `OCID`__ of the CPE. 1101 1102 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 1103 1104 :param oci.core.models.ChangeCpeCompartmentDetails change_cpe_compartment_details: (required) 1105 Request to change the compartment of a CPE. 1106 1107 :param str opc_request_id: (optional) 1108 Unique identifier for the request. 1109 If you need to contact Oracle about a particular request, please provide the request ID. 1110 1111 :param str opc_retry_token: (optional) 1112 A token that uniquely identifies a request so it can be retried in case of a timeout or 1113 server error without risk of executing that same action again. Retry tokens expire after 24 1114 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1115 has been deleted and purged from the system, then a retry of the original creation request 1116 may be rejected). 1117 1118 :param obj retry_strategy: (optional) 1119 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1120 1121 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. 1122 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1123 1124 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1125 1126 :return: A :class:`~oci.response.Response` object with data of type None 1127 :rtype: :class:`~oci.response.Response` 1128 1129 :example: 1130 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_cpe_compartment.py.html>`__ to see an example of how to use change_cpe_compartment API. 1131 """ 1132 resource_path = "/cpes/{cpeId}/actions/changeCompartment" 1133 method = "POST" 1134 1135 # Don't accept unknown kwargs 1136 expected_kwargs = [ 1137 "retry_strategy", 1138 "opc_request_id", 1139 "opc_retry_token" 1140 ] 1141 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1142 if extra_kwargs: 1143 raise ValueError( 1144 "change_cpe_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1145 1146 path_params = { 1147 "cpeId": cpe_id 1148 } 1149 1150 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1151 1152 for (k, v) in six.iteritems(path_params): 1153 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1154 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1155 1156 header_params = { 1157 "accept": "application/json", 1158 "content-type": "application/json", 1159 "opc-request-id": kwargs.get("opc_request_id", missing), 1160 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1161 } 1162 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1163 1164 retry_strategy = self.base_client.get_preferred_retry_strategy( 1165 operation_retry_strategy=kwargs.get('retry_strategy'), 1166 client_retry_strategy=self.retry_strategy 1167 ) 1168 1169 if retry_strategy: 1170 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1171 self.base_client.add_opc_retry_token_if_needed(header_params) 1172 self.base_client.add_opc_client_retries_header(header_params) 1173 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1174 return retry_strategy.make_retrying_call( 1175 self.base_client.call_api, 1176 resource_path=resource_path, 1177 method=method, 1178 path_params=path_params, 1179 header_params=header_params, 1180 body=change_cpe_compartment_details) 1181 else: 1182 return self.base_client.call_api( 1183 resource_path=resource_path, 1184 method=method, 1185 path_params=path_params, 1186 header_params=header_params, 1187 body=change_cpe_compartment_details) 1188 1189 def change_cross_connect_compartment(self, cross_connect_id, change_cross_connect_compartment_details, **kwargs): 1190 """ 1191 Moves a cross-connect into a different compartment within the same tenancy. For information 1192 about moving resources between compartments, see 1193 `Moving Resources to a Different Compartment`__. 1194 1195 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1196 1197 1198 :param str cross_connect_id: (required) 1199 The `OCID`__ of the cross-connect. 1200 1201 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 1202 1203 :param oci.core.models.ChangeCrossConnectCompartmentDetails change_cross_connect_compartment_details: (required) 1204 Request to change the compartment of a Cross Connect. 1205 1206 :param str opc_request_id: (optional) 1207 Unique identifier for the request. 1208 If you need to contact Oracle about a particular request, please provide the request ID. 1209 1210 :param str opc_retry_token: (optional) 1211 A token that uniquely identifies a request so it can be retried in case of a timeout or 1212 server error without risk of executing that same action again. Retry tokens expire after 24 1213 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1214 has been deleted and purged from the system, then a retry of the original creation request 1215 may be rejected). 1216 1217 :param obj retry_strategy: (optional) 1218 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1219 1220 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. 1221 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1222 1223 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1224 1225 :return: A :class:`~oci.response.Response` object with data of type None 1226 :rtype: :class:`~oci.response.Response` 1227 1228 :example: 1229 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_cross_connect_compartment.py.html>`__ to see an example of how to use change_cross_connect_compartment API. 1230 """ 1231 resource_path = "/crossConnects/{crossConnectId}/actions/changeCompartment" 1232 method = "POST" 1233 1234 # Don't accept unknown kwargs 1235 expected_kwargs = [ 1236 "retry_strategy", 1237 "opc_request_id", 1238 "opc_retry_token" 1239 ] 1240 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1241 if extra_kwargs: 1242 raise ValueError( 1243 "change_cross_connect_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1244 1245 path_params = { 1246 "crossConnectId": cross_connect_id 1247 } 1248 1249 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1250 1251 for (k, v) in six.iteritems(path_params): 1252 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1253 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1254 1255 header_params = { 1256 "accept": "application/json", 1257 "content-type": "application/json", 1258 "opc-request-id": kwargs.get("opc_request_id", missing), 1259 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1260 } 1261 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1262 1263 retry_strategy = self.base_client.get_preferred_retry_strategy( 1264 operation_retry_strategy=kwargs.get('retry_strategy'), 1265 client_retry_strategy=self.retry_strategy 1266 ) 1267 1268 if retry_strategy: 1269 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1270 self.base_client.add_opc_retry_token_if_needed(header_params) 1271 self.base_client.add_opc_client_retries_header(header_params) 1272 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1273 return retry_strategy.make_retrying_call( 1274 self.base_client.call_api, 1275 resource_path=resource_path, 1276 method=method, 1277 path_params=path_params, 1278 header_params=header_params, 1279 body=change_cross_connect_compartment_details) 1280 else: 1281 return self.base_client.call_api( 1282 resource_path=resource_path, 1283 method=method, 1284 path_params=path_params, 1285 header_params=header_params, 1286 body=change_cross_connect_compartment_details) 1287 1288 def change_cross_connect_group_compartment(self, cross_connect_group_id, change_cross_connect_group_compartment_details, **kwargs): 1289 """ 1290 Moves a cross-connect group into a different compartment within the same tenancy. For information 1291 about moving resources between compartments, see 1292 `Moving Resources to a Different Compartment`__. 1293 1294 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1295 1296 1297 :param str cross_connect_group_id: (required) 1298 The `OCID`__ of the cross-connect group. 1299 1300 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 1301 1302 :param oci.core.models.ChangeCrossConnectGroupCompartmentDetails change_cross_connect_group_compartment_details: (required) 1303 Request to change the compartment of a Cross Connect Group. 1304 1305 :param str opc_request_id: (optional) 1306 Unique identifier for the request. 1307 If you need to contact Oracle about a particular request, please provide the request ID. 1308 1309 :param str opc_retry_token: (optional) 1310 A token that uniquely identifies a request so it can be retried in case of a timeout or 1311 server error without risk of executing that same action again. Retry tokens expire after 24 1312 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1313 has been deleted and purged from the system, then a retry of the original creation request 1314 may be rejected). 1315 1316 :param obj retry_strategy: (optional) 1317 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1318 1319 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. 1320 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1321 1322 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1323 1324 :return: A :class:`~oci.response.Response` object with data of type None 1325 :rtype: :class:`~oci.response.Response` 1326 1327 :example: 1328 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_cross_connect_group_compartment.py.html>`__ to see an example of how to use change_cross_connect_group_compartment API. 1329 """ 1330 resource_path = "/crossConnectGroups/{crossConnectGroupId}/actions/changeCompartment" 1331 method = "POST" 1332 1333 # Don't accept unknown kwargs 1334 expected_kwargs = [ 1335 "retry_strategy", 1336 "opc_request_id", 1337 "opc_retry_token" 1338 ] 1339 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1340 if extra_kwargs: 1341 raise ValueError( 1342 "change_cross_connect_group_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1343 1344 path_params = { 1345 "crossConnectGroupId": cross_connect_group_id 1346 } 1347 1348 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1349 1350 for (k, v) in six.iteritems(path_params): 1351 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1352 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1353 1354 header_params = { 1355 "accept": "application/json", 1356 "content-type": "application/json", 1357 "opc-request-id": kwargs.get("opc_request_id", missing), 1358 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1359 } 1360 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1361 1362 retry_strategy = self.base_client.get_preferred_retry_strategy( 1363 operation_retry_strategy=kwargs.get('retry_strategy'), 1364 client_retry_strategy=self.retry_strategy 1365 ) 1366 1367 if retry_strategy: 1368 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1369 self.base_client.add_opc_retry_token_if_needed(header_params) 1370 self.base_client.add_opc_client_retries_header(header_params) 1371 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1372 return retry_strategy.make_retrying_call( 1373 self.base_client.call_api, 1374 resource_path=resource_path, 1375 method=method, 1376 path_params=path_params, 1377 header_params=header_params, 1378 body=change_cross_connect_group_compartment_details) 1379 else: 1380 return self.base_client.call_api( 1381 resource_path=resource_path, 1382 method=method, 1383 path_params=path_params, 1384 header_params=header_params, 1385 body=change_cross_connect_group_compartment_details) 1386 1387 def change_dhcp_options_compartment(self, dhcp_id, change_dhcp_options_compartment_details, **kwargs): 1388 """ 1389 Moves a set of DHCP options into a different compartment within the same tenancy. For information 1390 about moving resources between compartments, see 1391 `Moving Resources to a Different Compartment`__. 1392 1393 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1394 1395 1396 :param str dhcp_id: (required) 1397 The `OCID`__ for the set of DHCP options. 1398 1399 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 1400 1401 :param oci.core.models.ChangeDhcpOptionsCompartmentDetails change_dhcp_options_compartment_details: (required) 1402 Request to change the compartment of a set of DHCP Options. 1403 1404 :param str opc_request_id: (optional) 1405 Unique identifier for the request. 1406 If you need to contact Oracle about a particular request, please provide the request ID. 1407 1408 :param str opc_retry_token: (optional) 1409 A token that uniquely identifies a request so it can be retried in case of a timeout or 1410 server error without risk of executing that same action again. Retry tokens expire after 24 1411 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1412 has been deleted and purged from the system, then a retry of the original creation request 1413 may be rejected). 1414 1415 :param obj retry_strategy: (optional) 1416 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1417 1418 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. 1419 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1420 1421 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1422 1423 :return: A :class:`~oci.response.Response` object with data of type None 1424 :rtype: :class:`~oci.response.Response` 1425 1426 :example: 1427 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_dhcp_options_compartment.py.html>`__ to see an example of how to use change_dhcp_options_compartment API. 1428 """ 1429 resource_path = "/dhcps/{dhcpId}/actions/changeCompartment" 1430 method = "POST" 1431 1432 # Don't accept unknown kwargs 1433 expected_kwargs = [ 1434 "retry_strategy", 1435 "opc_request_id", 1436 "opc_retry_token" 1437 ] 1438 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1439 if extra_kwargs: 1440 raise ValueError( 1441 "change_dhcp_options_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1442 1443 path_params = { 1444 "dhcpId": dhcp_id 1445 } 1446 1447 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1448 1449 for (k, v) in six.iteritems(path_params): 1450 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1451 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1452 1453 header_params = { 1454 "accept": "application/json", 1455 "content-type": "application/json", 1456 "opc-request-id": kwargs.get("opc_request_id", missing), 1457 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1458 } 1459 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1460 1461 retry_strategy = self.base_client.get_preferred_retry_strategy( 1462 operation_retry_strategy=kwargs.get('retry_strategy'), 1463 client_retry_strategy=self.retry_strategy 1464 ) 1465 1466 if retry_strategy: 1467 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1468 self.base_client.add_opc_retry_token_if_needed(header_params) 1469 self.base_client.add_opc_client_retries_header(header_params) 1470 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1471 return retry_strategy.make_retrying_call( 1472 self.base_client.call_api, 1473 resource_path=resource_path, 1474 method=method, 1475 path_params=path_params, 1476 header_params=header_params, 1477 body=change_dhcp_options_compartment_details) 1478 else: 1479 return self.base_client.call_api( 1480 resource_path=resource_path, 1481 method=method, 1482 path_params=path_params, 1483 header_params=header_params, 1484 body=change_dhcp_options_compartment_details) 1485 1486 def change_drg_compartment(self, drg_id, change_drg_compartment_details, **kwargs): 1487 """ 1488 Moves a DRG into a different compartment within the same tenancy. For information 1489 about moving resources between compartments, see 1490 `Moving Resources to a Different Compartment`__. 1491 1492 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1493 1494 1495 :param str drg_id: (required) 1496 The `OCID`__ of the DRG. 1497 1498 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 1499 1500 :param oci.core.models.ChangeDrgCompartmentDetails change_drg_compartment_details: (required) 1501 Request to change the compartment of a DRG. 1502 1503 :param str opc_request_id: (optional) 1504 Unique identifier for the request. 1505 If you need to contact Oracle about a particular request, please provide the request ID. 1506 1507 :param str opc_retry_token: (optional) 1508 A token that uniquely identifies a request so it can be retried in case of a timeout or 1509 server error without risk of executing that same action again. Retry tokens expire after 24 1510 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1511 has been deleted and purged from the system, then a retry of the original creation request 1512 may be rejected). 1513 1514 :param obj retry_strategy: (optional) 1515 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1516 1517 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. 1518 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1519 1520 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1521 1522 :return: A :class:`~oci.response.Response` object with data of type None 1523 :rtype: :class:`~oci.response.Response` 1524 1525 :example: 1526 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_drg_compartment.py.html>`__ to see an example of how to use change_drg_compartment API. 1527 """ 1528 resource_path = "/drgs/{drgId}/actions/changeCompartment" 1529 method = "POST" 1530 1531 # Don't accept unknown kwargs 1532 expected_kwargs = [ 1533 "retry_strategy", 1534 "opc_request_id", 1535 "opc_retry_token" 1536 ] 1537 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1538 if extra_kwargs: 1539 raise ValueError( 1540 "change_drg_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1541 1542 path_params = { 1543 "drgId": drg_id 1544 } 1545 1546 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1547 1548 for (k, v) in six.iteritems(path_params): 1549 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1550 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1551 1552 header_params = { 1553 "accept": "application/json", 1554 "content-type": "application/json", 1555 "opc-request-id": kwargs.get("opc_request_id", missing), 1556 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1557 } 1558 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1559 1560 retry_strategy = self.base_client.get_preferred_retry_strategy( 1561 operation_retry_strategy=kwargs.get('retry_strategy'), 1562 client_retry_strategy=self.retry_strategy 1563 ) 1564 1565 if retry_strategy: 1566 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1567 self.base_client.add_opc_retry_token_if_needed(header_params) 1568 self.base_client.add_opc_client_retries_header(header_params) 1569 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1570 return retry_strategy.make_retrying_call( 1571 self.base_client.call_api, 1572 resource_path=resource_path, 1573 method=method, 1574 path_params=path_params, 1575 header_params=header_params, 1576 body=change_drg_compartment_details) 1577 else: 1578 return self.base_client.call_api( 1579 resource_path=resource_path, 1580 method=method, 1581 path_params=path_params, 1582 header_params=header_params, 1583 body=change_drg_compartment_details) 1584 1585 def change_internet_gateway_compartment(self, ig_id, change_internet_gateway_compartment_details, **kwargs): 1586 """ 1587 Moves an internet gateway into a different compartment within the same tenancy. For information 1588 about moving resources between compartments, see 1589 `Moving Resources to a Different Compartment`__. 1590 1591 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1592 1593 1594 :param str ig_id: (required) 1595 The `OCID`__ of the internet gateway. 1596 1597 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 1598 1599 :param oci.core.models.ChangeInternetGatewayCompartmentDetails change_internet_gateway_compartment_details: (required) 1600 Request to change the compartment of an internet gateway. 1601 1602 :param str opc_request_id: (optional) 1603 Unique identifier for the request. 1604 If you need to contact Oracle about a particular request, please provide the request ID. 1605 1606 :param str opc_retry_token: (optional) 1607 A token that uniquely identifies a request so it can be retried in case of a timeout or 1608 server error without risk of executing that same action again. Retry tokens expire after 24 1609 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1610 has been deleted and purged from the system, then a retry of the original creation request 1611 may be rejected). 1612 1613 :param obj retry_strategy: (optional) 1614 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1615 1616 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. 1617 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1618 1619 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1620 1621 :return: A :class:`~oci.response.Response` object with data of type None 1622 :rtype: :class:`~oci.response.Response` 1623 1624 :example: 1625 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_internet_gateway_compartment.py.html>`__ to see an example of how to use change_internet_gateway_compartment API. 1626 """ 1627 resource_path = "/internetGateways/{igId}/actions/changeCompartment" 1628 method = "POST" 1629 1630 # Don't accept unknown kwargs 1631 expected_kwargs = [ 1632 "retry_strategy", 1633 "opc_request_id", 1634 "opc_retry_token" 1635 ] 1636 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1637 if extra_kwargs: 1638 raise ValueError( 1639 "change_internet_gateway_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1640 1641 path_params = { 1642 "igId": ig_id 1643 } 1644 1645 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1646 1647 for (k, v) in six.iteritems(path_params): 1648 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1649 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1650 1651 header_params = { 1652 "accept": "application/json", 1653 "content-type": "application/json", 1654 "opc-request-id": kwargs.get("opc_request_id", missing), 1655 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1656 } 1657 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1658 1659 retry_strategy = self.base_client.get_preferred_retry_strategy( 1660 operation_retry_strategy=kwargs.get('retry_strategy'), 1661 client_retry_strategy=self.retry_strategy 1662 ) 1663 1664 if retry_strategy: 1665 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1666 self.base_client.add_opc_retry_token_if_needed(header_params) 1667 self.base_client.add_opc_client_retries_header(header_params) 1668 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1669 return retry_strategy.make_retrying_call( 1670 self.base_client.call_api, 1671 resource_path=resource_path, 1672 method=method, 1673 path_params=path_params, 1674 header_params=header_params, 1675 body=change_internet_gateway_compartment_details) 1676 else: 1677 return self.base_client.call_api( 1678 resource_path=resource_path, 1679 method=method, 1680 path_params=path_params, 1681 header_params=header_params, 1682 body=change_internet_gateway_compartment_details) 1683 1684 def change_ip_sec_connection_compartment(self, ipsc_id, change_ip_sec_connection_compartment_details, **kwargs): 1685 """ 1686 Moves an IPSec connection into a different compartment within the same tenancy. For information 1687 about moving resources between compartments, see 1688 `Moving Resources to a Different Compartment`__. 1689 1690 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1691 1692 1693 :param str ipsc_id: (required) 1694 The `OCID`__ of the IPSec connection. 1695 1696 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 1697 1698 :param oci.core.models.ChangeIPSecConnectionCompartmentDetails change_ip_sec_connection_compartment_details: (required) 1699 Request to change the compartment of a IPSec connection. 1700 1701 :param str opc_request_id: (optional) 1702 Unique identifier for the request. 1703 If you need to contact Oracle about a particular request, please provide the request ID. 1704 1705 :param str opc_retry_token: (optional) 1706 A token that uniquely identifies a request so it can be retried in case of a timeout or 1707 server error without risk of executing that same action again. Retry tokens expire after 24 1708 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1709 has been deleted and purged from the system, then a retry of the original creation request 1710 may be rejected). 1711 1712 :param obj retry_strategy: (optional) 1713 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1714 1715 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. 1716 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1717 1718 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1719 1720 :return: A :class:`~oci.response.Response` object with data of type None 1721 :rtype: :class:`~oci.response.Response` 1722 1723 :example: 1724 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_ip_sec_connection_compartment.py.html>`__ to see an example of how to use change_ip_sec_connection_compartment API. 1725 """ 1726 resource_path = "/ipsecConnections/{ipscId}/actions/changeCompartment" 1727 method = "POST" 1728 1729 # Don't accept unknown kwargs 1730 expected_kwargs = [ 1731 "retry_strategy", 1732 "opc_request_id", 1733 "opc_retry_token" 1734 ] 1735 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1736 if extra_kwargs: 1737 raise ValueError( 1738 "change_ip_sec_connection_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1739 1740 path_params = { 1741 "ipscId": ipsc_id 1742 } 1743 1744 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1745 1746 for (k, v) in six.iteritems(path_params): 1747 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1748 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1749 1750 header_params = { 1751 "accept": "application/json", 1752 "content-type": "application/json", 1753 "opc-request-id": kwargs.get("opc_request_id", missing), 1754 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1755 } 1756 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1757 1758 retry_strategy = self.base_client.get_preferred_retry_strategy( 1759 operation_retry_strategy=kwargs.get('retry_strategy'), 1760 client_retry_strategy=self.retry_strategy 1761 ) 1762 1763 if retry_strategy: 1764 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1765 self.base_client.add_opc_retry_token_if_needed(header_params) 1766 self.base_client.add_opc_client_retries_header(header_params) 1767 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1768 return retry_strategy.make_retrying_call( 1769 self.base_client.call_api, 1770 resource_path=resource_path, 1771 method=method, 1772 path_params=path_params, 1773 header_params=header_params, 1774 body=change_ip_sec_connection_compartment_details) 1775 else: 1776 return self.base_client.call_api( 1777 resource_path=resource_path, 1778 method=method, 1779 path_params=path_params, 1780 header_params=header_params, 1781 body=change_ip_sec_connection_compartment_details) 1782 1783 def change_local_peering_gateway_compartment(self, local_peering_gateway_id, change_local_peering_gateway_compartment_details, **kwargs): 1784 """ 1785 Moves a local peering gateway into a different compartment within the same tenancy. For information 1786 about moving resources between compartments, see 1787 `Moving Resources to a Different Compartment`__. 1788 1789 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1790 1791 1792 :param str local_peering_gateway_id: (required) 1793 The `OCID`__ of the local peering gateway. 1794 1795 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 1796 1797 :param oci.core.models.ChangeLocalPeeringGatewayCompartmentDetails change_local_peering_gateway_compartment_details: (required) 1798 Request to change the compartment of a given local peering gateway. 1799 1800 :param str opc_request_id: (optional) 1801 Unique identifier for the request. 1802 If you need to contact Oracle about a particular request, please provide the request ID. 1803 1804 :param str opc_retry_token: (optional) 1805 A token that uniquely identifies a request so it can be retried in case of a timeout or 1806 server error without risk of executing that same action again. Retry tokens expire after 24 1807 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1808 has been deleted and purged from the system, then a retry of the original creation request 1809 may be rejected). 1810 1811 :param obj retry_strategy: (optional) 1812 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1813 1814 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. 1815 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1816 1817 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1818 1819 :return: A :class:`~oci.response.Response` object with data of type None 1820 :rtype: :class:`~oci.response.Response` 1821 1822 :example: 1823 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_local_peering_gateway_compartment.py.html>`__ to see an example of how to use change_local_peering_gateway_compartment API. 1824 """ 1825 resource_path = "/localPeeringGateways/{localPeeringGatewayId}/actions/changeCompartment" 1826 method = "POST" 1827 1828 # Don't accept unknown kwargs 1829 expected_kwargs = [ 1830 "retry_strategy", 1831 "opc_request_id", 1832 "opc_retry_token" 1833 ] 1834 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1835 if extra_kwargs: 1836 raise ValueError( 1837 "change_local_peering_gateway_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1838 1839 path_params = { 1840 "localPeeringGatewayId": local_peering_gateway_id 1841 } 1842 1843 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1844 1845 for (k, v) in six.iteritems(path_params): 1846 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1847 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1848 1849 header_params = { 1850 "accept": "application/json", 1851 "content-type": "application/json", 1852 "opc-request-id": kwargs.get("opc_request_id", missing), 1853 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1854 } 1855 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1856 1857 retry_strategy = self.base_client.get_preferred_retry_strategy( 1858 operation_retry_strategy=kwargs.get('retry_strategy'), 1859 client_retry_strategy=self.retry_strategy 1860 ) 1861 1862 if retry_strategy: 1863 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1864 self.base_client.add_opc_retry_token_if_needed(header_params) 1865 self.base_client.add_opc_client_retries_header(header_params) 1866 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1867 return retry_strategy.make_retrying_call( 1868 self.base_client.call_api, 1869 resource_path=resource_path, 1870 method=method, 1871 path_params=path_params, 1872 header_params=header_params, 1873 body=change_local_peering_gateway_compartment_details) 1874 else: 1875 return self.base_client.call_api( 1876 resource_path=resource_path, 1877 method=method, 1878 path_params=path_params, 1879 header_params=header_params, 1880 body=change_local_peering_gateway_compartment_details) 1881 1882 def change_nat_gateway_compartment(self, nat_gateway_id, change_nat_gateway_compartment_details, **kwargs): 1883 """ 1884 Moves a NAT gateway into a different compartment within the same tenancy. For information 1885 about moving resources between compartments, see 1886 `Moving Resources to a Different Compartment`__. 1887 1888 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1889 1890 1891 :param str nat_gateway_id: (required) 1892 The NAT gateway's `OCID`__. 1893 1894 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 1895 1896 :param oci.core.models.ChangeNatGatewayCompartmentDetails change_nat_gateway_compartment_details: (required) 1897 Request to change the compartment of a given NAT Gateway. 1898 1899 :param str opc_request_id: (optional) 1900 Unique identifier for the request. 1901 If you need to contact Oracle about a particular request, please provide the request ID. 1902 1903 :param str opc_retry_token: (optional) 1904 A token that uniquely identifies a request so it can be retried in case of a timeout or 1905 server error without risk of executing that same action again. Retry tokens expire after 24 1906 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 1907 has been deleted and purged from the system, then a retry of the original creation request 1908 may be rejected). 1909 1910 :param obj retry_strategy: (optional) 1911 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1912 1913 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. 1914 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1915 1916 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1917 1918 :return: A :class:`~oci.response.Response` object with data of type None 1919 :rtype: :class:`~oci.response.Response` 1920 1921 :example: 1922 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_nat_gateway_compartment.py.html>`__ to see an example of how to use change_nat_gateway_compartment API. 1923 """ 1924 resource_path = "/natGateways/{natGatewayId}/actions/changeCompartment" 1925 method = "POST" 1926 1927 # Don't accept unknown kwargs 1928 expected_kwargs = [ 1929 "retry_strategy", 1930 "opc_request_id", 1931 "opc_retry_token" 1932 ] 1933 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1934 if extra_kwargs: 1935 raise ValueError( 1936 "change_nat_gateway_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 1937 1938 path_params = { 1939 "natGatewayId": nat_gateway_id 1940 } 1941 1942 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1943 1944 for (k, v) in six.iteritems(path_params): 1945 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1946 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1947 1948 header_params = { 1949 "accept": "application/json", 1950 "content-type": "application/json", 1951 "opc-request-id": kwargs.get("opc_request_id", missing), 1952 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1953 } 1954 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1955 1956 retry_strategy = self.base_client.get_preferred_retry_strategy( 1957 operation_retry_strategy=kwargs.get('retry_strategy'), 1958 client_retry_strategy=self.retry_strategy 1959 ) 1960 1961 if retry_strategy: 1962 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1963 self.base_client.add_opc_retry_token_if_needed(header_params) 1964 self.base_client.add_opc_client_retries_header(header_params) 1965 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1966 return retry_strategy.make_retrying_call( 1967 self.base_client.call_api, 1968 resource_path=resource_path, 1969 method=method, 1970 path_params=path_params, 1971 header_params=header_params, 1972 body=change_nat_gateway_compartment_details) 1973 else: 1974 return self.base_client.call_api( 1975 resource_path=resource_path, 1976 method=method, 1977 path_params=path_params, 1978 header_params=header_params, 1979 body=change_nat_gateway_compartment_details) 1980 1981 def change_network_security_group_compartment(self, network_security_group_id, change_network_security_group_compartment_details, **kwargs): 1982 """ 1983 Moves a network security group into a different compartment within the same tenancy. For 1984 information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. 1985 1986 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 1987 1988 1989 :param str network_security_group_id: (required) 1990 The `OCID`__ of the network security group. 1991 1992 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 1993 1994 :param oci.core.models.ChangeNetworkSecurityGroupCompartmentDetails change_network_security_group_compartment_details: (required) 1995 Request to change the compartment of a network security group. 1996 1997 :param str opc_request_id: (optional) 1998 Unique identifier for the request. 1999 If you need to contact Oracle about a particular request, please provide the request ID. 2000 2001 :param str opc_retry_token: (optional) 2002 A token that uniquely identifies a request so it can be retried in case of a timeout or 2003 server error without risk of executing that same action again. Retry tokens expire after 24 2004 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2005 has been deleted and purged from the system, then a retry of the original creation request 2006 may be rejected). 2007 2008 :param obj retry_strategy: (optional) 2009 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2010 2011 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. 2012 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2013 2014 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2015 2016 :return: A :class:`~oci.response.Response` object with data of type None 2017 :rtype: :class:`~oci.response.Response` 2018 2019 :example: 2020 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_network_security_group_compartment.py.html>`__ to see an example of how to use change_network_security_group_compartment API. 2021 """ 2022 resource_path = "/networkSecurityGroups/{networkSecurityGroupId}/actions/changeCompartment" 2023 method = "POST" 2024 2025 # Don't accept unknown kwargs 2026 expected_kwargs = [ 2027 "retry_strategy", 2028 "opc_request_id", 2029 "opc_retry_token" 2030 ] 2031 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2032 if extra_kwargs: 2033 raise ValueError( 2034 "change_network_security_group_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2035 2036 path_params = { 2037 "networkSecurityGroupId": network_security_group_id 2038 } 2039 2040 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2041 2042 for (k, v) in six.iteritems(path_params): 2043 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2044 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2045 2046 header_params = { 2047 "accept": "application/json", 2048 "content-type": "application/json", 2049 "opc-request-id": kwargs.get("opc_request_id", missing), 2050 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2051 } 2052 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2053 2054 retry_strategy = self.base_client.get_preferred_retry_strategy( 2055 operation_retry_strategy=kwargs.get('retry_strategy'), 2056 client_retry_strategy=self.retry_strategy 2057 ) 2058 2059 if retry_strategy: 2060 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2061 self.base_client.add_opc_retry_token_if_needed(header_params) 2062 self.base_client.add_opc_client_retries_header(header_params) 2063 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2064 return retry_strategy.make_retrying_call( 2065 self.base_client.call_api, 2066 resource_path=resource_path, 2067 method=method, 2068 path_params=path_params, 2069 header_params=header_params, 2070 body=change_network_security_group_compartment_details) 2071 else: 2072 return self.base_client.call_api( 2073 resource_path=resource_path, 2074 method=method, 2075 path_params=path_params, 2076 header_params=header_params, 2077 body=change_network_security_group_compartment_details) 2078 2079 def change_public_ip_compartment(self, public_ip_id, change_public_ip_compartment_details, **kwargs): 2080 """ 2081 Moves a public IP into a different compartment within the same tenancy. For information 2082 about moving resources between compartments, see 2083 `Moving Resources to a Different Compartment`__. 2084 2085 This operation applies only to reserved public IPs. Ephemeral public IPs always belong to the 2086 same compartment as their VNIC and move accordingly. 2087 2088 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2089 2090 2091 :param str public_ip_id: (required) 2092 The `OCID`__ of the public IP. 2093 2094 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 2095 2096 :param oci.core.models.ChangePublicIpCompartmentDetails change_public_ip_compartment_details: (required) 2097 Request to change the compartment of a Public IP. 2098 2099 :param str opc_request_id: (optional) 2100 Unique identifier for the request. 2101 If you need to contact Oracle about a particular request, please provide the request ID. 2102 2103 :param str opc_retry_token: (optional) 2104 A token that uniquely identifies a request so it can be retried in case of a timeout or 2105 server error without risk of executing that same action again. Retry tokens expire after 24 2106 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2107 has been deleted and purged from the system, then a retry of the original creation request 2108 may be rejected). 2109 2110 :param obj retry_strategy: (optional) 2111 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2112 2113 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. 2114 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2115 2116 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2117 2118 :return: A :class:`~oci.response.Response` object with data of type None 2119 :rtype: :class:`~oci.response.Response` 2120 2121 :example: 2122 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_public_ip_compartment.py.html>`__ to see an example of how to use change_public_ip_compartment API. 2123 """ 2124 resource_path = "/publicIps/{publicIpId}/actions/changeCompartment" 2125 method = "POST" 2126 2127 # Don't accept unknown kwargs 2128 expected_kwargs = [ 2129 "retry_strategy", 2130 "opc_request_id", 2131 "opc_retry_token" 2132 ] 2133 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2134 if extra_kwargs: 2135 raise ValueError( 2136 "change_public_ip_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2137 2138 path_params = { 2139 "publicIpId": public_ip_id 2140 } 2141 2142 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2143 2144 for (k, v) in six.iteritems(path_params): 2145 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2146 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2147 2148 header_params = { 2149 "accept": "application/json", 2150 "content-type": "application/json", 2151 "opc-request-id": kwargs.get("opc_request_id", missing), 2152 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2153 } 2154 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2155 2156 retry_strategy = self.base_client.get_preferred_retry_strategy( 2157 operation_retry_strategy=kwargs.get('retry_strategy'), 2158 client_retry_strategy=self.retry_strategy 2159 ) 2160 2161 if retry_strategy: 2162 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2163 self.base_client.add_opc_retry_token_if_needed(header_params) 2164 self.base_client.add_opc_client_retries_header(header_params) 2165 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2166 return retry_strategy.make_retrying_call( 2167 self.base_client.call_api, 2168 resource_path=resource_path, 2169 method=method, 2170 path_params=path_params, 2171 header_params=header_params, 2172 body=change_public_ip_compartment_details) 2173 else: 2174 return self.base_client.call_api( 2175 resource_path=resource_path, 2176 method=method, 2177 path_params=path_params, 2178 header_params=header_params, 2179 body=change_public_ip_compartment_details) 2180 2181 def change_public_ip_pool_compartment(self, public_ip_pool_id, change_public_ip_pool_compartment_details, **kwargs): 2182 """ 2183 Moves a public IP pool to a different compartment. For information 2184 about moving resources between compartments, see 2185 `Moving Resources to a Different Compartment`__. 2186 2187 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2188 2189 2190 :param str public_ip_pool_id: (required) 2191 The `OCID`__ of the public IP pool. 2192 2193 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 2194 2195 :param oci.core.models.ChangePublicIpPoolCompartmentDetails change_public_ip_pool_compartment_details: (required) 2196 Request to change the compartment of a public IP pool. 2197 2198 :param str opc_request_id: (optional) 2199 Unique identifier for the request. 2200 If you need to contact Oracle about a particular request, please provide the request ID. 2201 2202 :param str opc_retry_token: (optional) 2203 A token that uniquely identifies a request so it can be retried in case of a timeout or 2204 server error without risk of executing that same action again. Retry tokens expire after 24 2205 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2206 has been deleted and purged from the system, then a retry of the original creation request 2207 may be rejected). 2208 2209 :param obj retry_strategy: (optional) 2210 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2211 2212 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. 2213 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2214 2215 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2216 2217 :return: A :class:`~oci.response.Response` object with data of type None 2218 :rtype: :class:`~oci.response.Response` 2219 2220 :example: 2221 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_public_ip_pool_compartment.py.html>`__ to see an example of how to use change_public_ip_pool_compartment API. 2222 """ 2223 resource_path = "/publicIpPools/{publicIpPoolId}/actions/changeCompartment" 2224 method = "POST" 2225 2226 # Don't accept unknown kwargs 2227 expected_kwargs = [ 2228 "retry_strategy", 2229 "opc_request_id", 2230 "opc_retry_token" 2231 ] 2232 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2233 if extra_kwargs: 2234 raise ValueError( 2235 "change_public_ip_pool_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2236 2237 path_params = { 2238 "publicIpPoolId": public_ip_pool_id 2239 } 2240 2241 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2242 2243 for (k, v) in six.iteritems(path_params): 2244 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2245 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2246 2247 header_params = { 2248 "accept": "application/json", 2249 "content-type": "application/json", 2250 "opc-request-id": kwargs.get("opc_request_id", missing), 2251 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2252 } 2253 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2254 2255 retry_strategy = self.base_client.get_preferred_retry_strategy( 2256 operation_retry_strategy=kwargs.get('retry_strategy'), 2257 client_retry_strategy=self.retry_strategy 2258 ) 2259 2260 if retry_strategy: 2261 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2262 self.base_client.add_opc_retry_token_if_needed(header_params) 2263 self.base_client.add_opc_client_retries_header(header_params) 2264 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2265 return retry_strategy.make_retrying_call( 2266 self.base_client.call_api, 2267 resource_path=resource_path, 2268 method=method, 2269 path_params=path_params, 2270 header_params=header_params, 2271 body=change_public_ip_pool_compartment_details) 2272 else: 2273 return self.base_client.call_api( 2274 resource_path=resource_path, 2275 method=method, 2276 path_params=path_params, 2277 header_params=header_params, 2278 body=change_public_ip_pool_compartment_details) 2279 2280 def change_remote_peering_connection_compartment(self, remote_peering_connection_id, change_remote_peering_connection_compartment_details, **kwargs): 2281 """ 2282 Moves a remote peering connection (RPC) into a different compartment within the same tenancy. For information 2283 about moving resources between compartments, see 2284 `Moving Resources to a Different Compartment`__. 2285 2286 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2287 2288 2289 :param str remote_peering_connection_id: (required) 2290 The `OCID`__ of the remote peering connection (RPC). 2291 2292 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 2293 2294 :param oci.core.models.ChangeRemotePeeringConnectionCompartmentDetails change_remote_peering_connection_compartment_details: (required) 2295 Request to change the compartment of a remote peering connection. 2296 2297 :param str opc_request_id: (optional) 2298 Unique identifier for the request. 2299 If you need to contact Oracle about a particular request, please provide the request ID. 2300 2301 :param str opc_retry_token: (optional) 2302 A token that uniquely identifies a request so it can be retried in case of a timeout or 2303 server error without risk of executing that same action again. Retry tokens expire after 24 2304 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2305 has been deleted and purged from the system, then a retry of the original creation request 2306 may be rejected). 2307 2308 :param obj retry_strategy: (optional) 2309 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2310 2311 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. 2312 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2313 2314 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2315 2316 :return: A :class:`~oci.response.Response` object with data of type None 2317 :rtype: :class:`~oci.response.Response` 2318 2319 :example: 2320 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_remote_peering_connection_compartment.py.html>`__ to see an example of how to use change_remote_peering_connection_compartment API. 2321 """ 2322 resource_path = "/remotePeeringConnections/{remotePeeringConnectionId}/actions/changeCompartment" 2323 method = "POST" 2324 2325 # Don't accept unknown kwargs 2326 expected_kwargs = [ 2327 "retry_strategy", 2328 "opc_request_id", 2329 "opc_retry_token" 2330 ] 2331 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2332 if extra_kwargs: 2333 raise ValueError( 2334 "change_remote_peering_connection_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2335 2336 path_params = { 2337 "remotePeeringConnectionId": remote_peering_connection_id 2338 } 2339 2340 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2341 2342 for (k, v) in six.iteritems(path_params): 2343 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2344 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2345 2346 header_params = { 2347 "accept": "application/json", 2348 "content-type": "application/json", 2349 "opc-request-id": kwargs.get("opc_request_id", missing), 2350 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2351 } 2352 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2353 2354 retry_strategy = self.base_client.get_preferred_retry_strategy( 2355 operation_retry_strategy=kwargs.get('retry_strategy'), 2356 client_retry_strategy=self.retry_strategy 2357 ) 2358 2359 if retry_strategy: 2360 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2361 self.base_client.add_opc_retry_token_if_needed(header_params) 2362 self.base_client.add_opc_client_retries_header(header_params) 2363 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2364 return retry_strategy.make_retrying_call( 2365 self.base_client.call_api, 2366 resource_path=resource_path, 2367 method=method, 2368 path_params=path_params, 2369 header_params=header_params, 2370 body=change_remote_peering_connection_compartment_details) 2371 else: 2372 return self.base_client.call_api( 2373 resource_path=resource_path, 2374 method=method, 2375 path_params=path_params, 2376 header_params=header_params, 2377 body=change_remote_peering_connection_compartment_details) 2378 2379 def change_route_table_compartment(self, rt_id, change_route_table_compartment_details, **kwargs): 2380 """ 2381 Moves a route table into a different compartment within the same tenancy. For information 2382 about moving resources between compartments, see 2383 `Moving Resources to a Different Compartment`__. 2384 2385 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2386 2387 2388 :param str rt_id: (required) 2389 The `OCID`__ of the route table. 2390 2391 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 2392 2393 :param oci.core.models.ChangeRouteTableCompartmentDetails change_route_table_compartment_details: (required) 2394 Request to change the compartment of a given route table. 2395 2396 :param str opc_request_id: (optional) 2397 Unique identifier for the request. 2398 If you need to contact Oracle about a particular request, please provide the request ID. 2399 2400 :param str opc_retry_token: (optional) 2401 A token that uniquely identifies a request so it can be retried in case of a timeout or 2402 server error without risk of executing that same action again. Retry tokens expire after 24 2403 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2404 has been deleted and purged from the system, then a retry of the original creation request 2405 may be rejected). 2406 2407 :param obj retry_strategy: (optional) 2408 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2409 2410 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. 2411 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2412 2413 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2414 2415 :return: A :class:`~oci.response.Response` object with data of type None 2416 :rtype: :class:`~oci.response.Response` 2417 2418 :example: 2419 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_route_table_compartment.py.html>`__ to see an example of how to use change_route_table_compartment API. 2420 """ 2421 resource_path = "/routeTables/{rtId}/actions/changeCompartment" 2422 method = "POST" 2423 2424 # Don't accept unknown kwargs 2425 expected_kwargs = [ 2426 "retry_strategy", 2427 "opc_request_id", 2428 "opc_retry_token" 2429 ] 2430 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2431 if extra_kwargs: 2432 raise ValueError( 2433 "change_route_table_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2434 2435 path_params = { 2436 "rtId": rt_id 2437 } 2438 2439 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2440 2441 for (k, v) in six.iteritems(path_params): 2442 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2443 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2444 2445 header_params = { 2446 "accept": "application/json", 2447 "content-type": "application/json", 2448 "opc-request-id": kwargs.get("opc_request_id", missing), 2449 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2450 } 2451 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2452 2453 retry_strategy = self.base_client.get_preferred_retry_strategy( 2454 operation_retry_strategy=kwargs.get('retry_strategy'), 2455 client_retry_strategy=self.retry_strategy 2456 ) 2457 2458 if retry_strategy: 2459 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2460 self.base_client.add_opc_retry_token_if_needed(header_params) 2461 self.base_client.add_opc_client_retries_header(header_params) 2462 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2463 return retry_strategy.make_retrying_call( 2464 self.base_client.call_api, 2465 resource_path=resource_path, 2466 method=method, 2467 path_params=path_params, 2468 header_params=header_params, 2469 body=change_route_table_compartment_details) 2470 else: 2471 return self.base_client.call_api( 2472 resource_path=resource_path, 2473 method=method, 2474 path_params=path_params, 2475 header_params=header_params, 2476 body=change_route_table_compartment_details) 2477 2478 def change_security_list_compartment(self, security_list_id, change_security_list_compartment_details, **kwargs): 2479 """ 2480 Moves a security list into a different compartment within the same tenancy. For information 2481 about moving resources between compartments, see 2482 `Moving Resources to a Different Compartment`__. 2483 2484 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2485 2486 2487 :param str security_list_id: (required) 2488 The `OCID`__ of the security list. 2489 2490 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 2491 2492 :param oci.core.models.ChangeSecurityListCompartmentDetails change_security_list_compartment_details: (required) 2493 Request to change the compartment of a given security list. 2494 2495 :param str opc_request_id: (optional) 2496 Unique identifier for the request. 2497 If you need to contact Oracle about a particular request, please provide the request ID. 2498 2499 :param str opc_retry_token: (optional) 2500 A token that uniquely identifies a request so it can be retried in case of a timeout or 2501 server error without risk of executing that same action again. Retry tokens expire after 24 2502 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2503 has been deleted and purged from the system, then a retry of the original creation request 2504 may be rejected). 2505 2506 :param obj retry_strategy: (optional) 2507 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2508 2509 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. 2510 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2511 2512 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2513 2514 :return: A :class:`~oci.response.Response` object with data of type None 2515 :rtype: :class:`~oci.response.Response` 2516 2517 :example: 2518 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_security_list_compartment.py.html>`__ to see an example of how to use change_security_list_compartment API. 2519 """ 2520 resource_path = "/securityLists/{securityListId}/actions/changeCompartment" 2521 method = "POST" 2522 2523 # Don't accept unknown kwargs 2524 expected_kwargs = [ 2525 "retry_strategy", 2526 "opc_request_id", 2527 "opc_retry_token" 2528 ] 2529 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2530 if extra_kwargs: 2531 raise ValueError( 2532 "change_security_list_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2533 2534 path_params = { 2535 "securityListId": security_list_id 2536 } 2537 2538 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2539 2540 for (k, v) in six.iteritems(path_params): 2541 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2542 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2543 2544 header_params = { 2545 "accept": "application/json", 2546 "content-type": "application/json", 2547 "opc-request-id": kwargs.get("opc_request_id", missing), 2548 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2549 } 2550 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2551 2552 retry_strategy = self.base_client.get_preferred_retry_strategy( 2553 operation_retry_strategy=kwargs.get('retry_strategy'), 2554 client_retry_strategy=self.retry_strategy 2555 ) 2556 2557 if retry_strategy: 2558 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2559 self.base_client.add_opc_retry_token_if_needed(header_params) 2560 self.base_client.add_opc_client_retries_header(header_params) 2561 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2562 return retry_strategy.make_retrying_call( 2563 self.base_client.call_api, 2564 resource_path=resource_path, 2565 method=method, 2566 path_params=path_params, 2567 header_params=header_params, 2568 body=change_security_list_compartment_details) 2569 else: 2570 return self.base_client.call_api( 2571 resource_path=resource_path, 2572 method=method, 2573 path_params=path_params, 2574 header_params=header_params, 2575 body=change_security_list_compartment_details) 2576 2577 def change_service_gateway_compartment(self, service_gateway_id, change_service_gateway_compartment_details, **kwargs): 2578 """ 2579 Moves a service gateway into a different compartment within the same tenancy. For information 2580 about moving resources between compartments, see 2581 `Moving Resources to a Different Compartment`__. 2582 2583 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2584 2585 2586 :param str service_gateway_id: (required) 2587 The service gateway's `OCID`__. 2588 2589 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 2590 2591 :param oci.core.models.ChangeServiceGatewayCompartmentDetails change_service_gateway_compartment_details: (required) 2592 Request to change the compartment of a given Service Gateway. 2593 2594 :param str opc_request_id: (optional) 2595 Unique identifier for the request. 2596 If you need to contact Oracle about a particular request, please provide the request ID. 2597 2598 :param str opc_retry_token: (optional) 2599 A token that uniquely identifies a request so it can be retried in case of a timeout or 2600 server error without risk of executing that same action again. Retry tokens expire after 24 2601 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2602 has been deleted and purged from the system, then a retry of the original creation request 2603 may be rejected). 2604 2605 :param obj retry_strategy: (optional) 2606 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2607 2608 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. 2609 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2610 2611 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2612 2613 :return: A :class:`~oci.response.Response` object with data of type None 2614 :rtype: :class:`~oci.response.Response` 2615 2616 :example: 2617 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_service_gateway_compartment.py.html>`__ to see an example of how to use change_service_gateway_compartment API. 2618 """ 2619 resource_path = "/serviceGateways/{serviceGatewayId}/actions/changeCompartment" 2620 method = "POST" 2621 2622 # Don't accept unknown kwargs 2623 expected_kwargs = [ 2624 "retry_strategy", 2625 "opc_request_id", 2626 "opc_retry_token" 2627 ] 2628 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2629 if extra_kwargs: 2630 raise ValueError( 2631 "change_service_gateway_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2632 2633 path_params = { 2634 "serviceGatewayId": service_gateway_id 2635 } 2636 2637 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2638 2639 for (k, v) in six.iteritems(path_params): 2640 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2641 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2642 2643 header_params = { 2644 "accept": "application/json", 2645 "content-type": "application/json", 2646 "opc-request-id": kwargs.get("opc_request_id", missing), 2647 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2648 } 2649 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2650 2651 retry_strategy = self.base_client.get_preferred_retry_strategy( 2652 operation_retry_strategy=kwargs.get('retry_strategy'), 2653 client_retry_strategy=self.retry_strategy 2654 ) 2655 2656 if retry_strategy: 2657 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2658 self.base_client.add_opc_retry_token_if_needed(header_params) 2659 self.base_client.add_opc_client_retries_header(header_params) 2660 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2661 return retry_strategy.make_retrying_call( 2662 self.base_client.call_api, 2663 resource_path=resource_path, 2664 method=method, 2665 path_params=path_params, 2666 header_params=header_params, 2667 body=change_service_gateway_compartment_details) 2668 else: 2669 return self.base_client.call_api( 2670 resource_path=resource_path, 2671 method=method, 2672 path_params=path_params, 2673 header_params=header_params, 2674 body=change_service_gateway_compartment_details) 2675 2676 def change_subnet_compartment(self, subnet_id, change_subnet_compartment_details, **kwargs): 2677 """ 2678 Moves a subnet into a different compartment within the same tenancy. For information 2679 about moving resources between compartments, see 2680 `Moving Resources to a Different Compartment`__. 2681 2682 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2683 2684 2685 :param str subnet_id: (required) 2686 The `OCID`__ of the subnet. 2687 2688 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 2689 2690 :param oci.core.models.ChangeSubnetCompartmentDetails change_subnet_compartment_details: (required) 2691 Request to change the compartment of a given subnet. 2692 2693 :param str opc_request_id: (optional) 2694 Unique identifier for the request. 2695 If you need to contact Oracle about a particular request, please provide the request ID. 2696 2697 :param str opc_retry_token: (optional) 2698 A token that uniquely identifies a request so it can be retried in case of a timeout or 2699 server error without risk of executing that same action again. Retry tokens expire after 24 2700 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2701 has been deleted and purged from the system, then a retry of the original creation request 2702 may be rejected). 2703 2704 :param obj retry_strategy: (optional) 2705 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2706 2707 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. 2708 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2709 2710 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2711 2712 :return: A :class:`~oci.response.Response` object with data of type None 2713 :rtype: :class:`~oci.response.Response` 2714 2715 :example: 2716 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_subnet_compartment.py.html>`__ to see an example of how to use change_subnet_compartment API. 2717 """ 2718 resource_path = "/subnets/{subnetId}/actions/changeCompartment" 2719 method = "POST" 2720 2721 # Don't accept unknown kwargs 2722 expected_kwargs = [ 2723 "retry_strategy", 2724 "opc_request_id", 2725 "opc_retry_token" 2726 ] 2727 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2728 if extra_kwargs: 2729 raise ValueError( 2730 "change_subnet_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2731 2732 path_params = { 2733 "subnetId": subnet_id 2734 } 2735 2736 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2737 2738 for (k, v) in six.iteritems(path_params): 2739 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2740 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2741 2742 header_params = { 2743 "accept": "application/json", 2744 "content-type": "application/json", 2745 "opc-request-id": kwargs.get("opc_request_id", missing), 2746 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2747 } 2748 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2749 2750 retry_strategy = self.base_client.get_preferred_retry_strategy( 2751 operation_retry_strategy=kwargs.get('retry_strategy'), 2752 client_retry_strategy=self.retry_strategy 2753 ) 2754 2755 if retry_strategy: 2756 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2757 self.base_client.add_opc_retry_token_if_needed(header_params) 2758 self.base_client.add_opc_client_retries_header(header_params) 2759 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2760 return retry_strategy.make_retrying_call( 2761 self.base_client.call_api, 2762 resource_path=resource_path, 2763 method=method, 2764 path_params=path_params, 2765 header_params=header_params, 2766 body=change_subnet_compartment_details) 2767 else: 2768 return self.base_client.call_api( 2769 resource_path=resource_path, 2770 method=method, 2771 path_params=path_params, 2772 header_params=header_params, 2773 body=change_subnet_compartment_details) 2774 2775 def change_vcn_compartment(self, vcn_id, change_vcn_compartment_details, **kwargs): 2776 """ 2777 Moves a VCN into a different compartment within the same tenancy. For information 2778 about moving resources between compartments, see 2779 `Moving Resources to a Different Compartment`__. 2780 2781 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2782 2783 2784 :param str vcn_id: (required) 2785 The `OCID`__ of the VCN. 2786 2787 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 2788 2789 :param oci.core.models.ChangeVcnCompartmentDetails change_vcn_compartment_details: (required) 2790 Request to change the compartment of a given VCN. 2791 2792 :param str opc_request_id: (optional) 2793 Unique identifier for the request. 2794 If you need to contact Oracle about a particular request, please provide the request ID. 2795 2796 :param str opc_retry_token: (optional) 2797 A token that uniquely identifies a request so it can be retried in case of a timeout or 2798 server error without risk of executing that same action again. Retry tokens expire after 24 2799 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2800 has been deleted and purged from the system, then a retry of the original creation request 2801 may be rejected). 2802 2803 :param obj retry_strategy: (optional) 2804 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2805 2806 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. 2807 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2808 2809 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2810 2811 :return: A :class:`~oci.response.Response` object with data of type None 2812 :rtype: :class:`~oci.response.Response` 2813 2814 :example: 2815 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_vcn_compartment.py.html>`__ to see an example of how to use change_vcn_compartment API. 2816 """ 2817 resource_path = "/vcns/{vcnId}/actions/changeCompartment" 2818 method = "POST" 2819 2820 # Don't accept unknown kwargs 2821 expected_kwargs = [ 2822 "retry_strategy", 2823 "opc_request_id", 2824 "opc_retry_token" 2825 ] 2826 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2827 if extra_kwargs: 2828 raise ValueError( 2829 "change_vcn_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2830 2831 path_params = { 2832 "vcnId": vcn_id 2833 } 2834 2835 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2836 2837 for (k, v) in six.iteritems(path_params): 2838 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2839 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2840 2841 header_params = { 2842 "accept": "application/json", 2843 "content-type": "application/json", 2844 "opc-request-id": kwargs.get("opc_request_id", missing), 2845 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2846 } 2847 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2848 2849 retry_strategy = self.base_client.get_preferred_retry_strategy( 2850 operation_retry_strategy=kwargs.get('retry_strategy'), 2851 client_retry_strategy=self.retry_strategy 2852 ) 2853 2854 if retry_strategy: 2855 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2856 self.base_client.add_opc_retry_token_if_needed(header_params) 2857 self.base_client.add_opc_client_retries_header(header_params) 2858 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2859 return retry_strategy.make_retrying_call( 2860 self.base_client.call_api, 2861 resource_path=resource_path, 2862 method=method, 2863 path_params=path_params, 2864 header_params=header_params, 2865 body=change_vcn_compartment_details) 2866 else: 2867 return self.base_client.call_api( 2868 resource_path=resource_path, 2869 method=method, 2870 path_params=path_params, 2871 header_params=header_params, 2872 body=change_vcn_compartment_details) 2873 2874 def change_virtual_circuit_compartment(self, virtual_circuit_id, change_virtual_circuit_compartment_details, **kwargs): 2875 """ 2876 Moves a virtual circuit into a different compartment within the same tenancy. For information 2877 about moving resources between compartments, see 2878 `Moving Resources to a Different Compartment`__. 2879 2880 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2881 2882 2883 :param str virtual_circuit_id: (required) 2884 The `OCID`__ of the virtual circuit. 2885 2886 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 2887 2888 :param oci.core.models.ChangeVirtualCircuitCompartmentDetails change_virtual_circuit_compartment_details: (required) 2889 Request to change the compartment of a virtual circuit. 2890 2891 :param str opc_request_id: (optional) 2892 Unique identifier for the request. 2893 If you need to contact Oracle about a particular request, please provide the request ID. 2894 2895 :param str opc_retry_token: (optional) 2896 A token that uniquely identifies a request so it can be retried in case of a timeout or 2897 server error without risk of executing that same action again. Retry tokens expire after 24 2898 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 2899 has been deleted and purged from the system, then a retry of the original creation request 2900 may be rejected). 2901 2902 :param obj retry_strategy: (optional) 2903 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2904 2905 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. 2906 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2907 2908 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2909 2910 :return: A :class:`~oci.response.Response` object with data of type None 2911 :rtype: :class:`~oci.response.Response` 2912 2913 :example: 2914 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_virtual_circuit_compartment.py.html>`__ to see an example of how to use change_virtual_circuit_compartment API. 2915 """ 2916 resource_path = "/virtualCircuits/{virtualCircuitId}/actions/changeCompartment" 2917 method = "POST" 2918 2919 # Don't accept unknown kwargs 2920 expected_kwargs = [ 2921 "retry_strategy", 2922 "opc_request_id", 2923 "opc_retry_token" 2924 ] 2925 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2926 if extra_kwargs: 2927 raise ValueError( 2928 "change_virtual_circuit_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 2929 2930 path_params = { 2931 "virtualCircuitId": virtual_circuit_id 2932 } 2933 2934 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2935 2936 for (k, v) in six.iteritems(path_params): 2937 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2938 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2939 2940 header_params = { 2941 "accept": "application/json", 2942 "content-type": "application/json", 2943 "opc-request-id": kwargs.get("opc_request_id", missing), 2944 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2945 } 2946 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2947 2948 retry_strategy = self.base_client.get_preferred_retry_strategy( 2949 operation_retry_strategy=kwargs.get('retry_strategy'), 2950 client_retry_strategy=self.retry_strategy 2951 ) 2952 2953 if retry_strategy: 2954 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2955 self.base_client.add_opc_retry_token_if_needed(header_params) 2956 self.base_client.add_opc_client_retries_header(header_params) 2957 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2958 return retry_strategy.make_retrying_call( 2959 self.base_client.call_api, 2960 resource_path=resource_path, 2961 method=method, 2962 path_params=path_params, 2963 header_params=header_params, 2964 body=change_virtual_circuit_compartment_details) 2965 else: 2966 return self.base_client.call_api( 2967 resource_path=resource_path, 2968 method=method, 2969 path_params=path_params, 2970 header_params=header_params, 2971 body=change_virtual_circuit_compartment_details) 2972 2973 def change_vlan_compartment(self, vlan_id, change_vlan_compartment_details, **kwargs): 2974 """ 2975 Moves a VLAN into a different compartment within the same tenancy. 2976 For information about moving resources between compartments, see 2977 `Moving Resources to a Different Compartment`__. 2978 2979 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes 2980 2981 2982 :param str vlan_id: (required) 2983 The `OCID`__ of the VLAN. 2984 2985 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 2986 2987 :param oci.core.models.ChangeVlanCompartmentDetails change_vlan_compartment_details: (required) 2988 Request to change the compartment of a given VLAN. 2989 2990 :param str if_match: (optional) 2991 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 2992 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 2993 will be updated or deleted only if the etag you provide matches the resource's current etag value. 2994 2995 :param str opc_request_id: (optional) 2996 Unique identifier for the request. 2997 If you need to contact Oracle about a particular request, please provide the request ID. 2998 2999 :param str opc_retry_token: (optional) 3000 A token that uniquely identifies a request so it can be retried in case of a timeout or 3001 server error without risk of executing that same action again. Retry tokens expire after 24 3002 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3003 has been deleted and purged from the system, then a retry of the original creation request 3004 may be rejected). 3005 3006 :param obj retry_strategy: (optional) 3007 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3008 3009 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. 3010 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3011 3012 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3013 3014 :return: A :class:`~oci.response.Response` object with data of type None 3015 :rtype: :class:`~oci.response.Response` 3016 3017 :example: 3018 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_vlan_compartment.py.html>`__ to see an example of how to use change_vlan_compartment API. 3019 """ 3020 resource_path = "/vlans/{vlanId}/actions/changeCompartment" 3021 method = "POST" 3022 3023 # Don't accept unknown kwargs 3024 expected_kwargs = [ 3025 "retry_strategy", 3026 "if_match", 3027 "opc_request_id", 3028 "opc_retry_token" 3029 ] 3030 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3031 if extra_kwargs: 3032 raise ValueError( 3033 "change_vlan_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 3034 3035 path_params = { 3036 "vlanId": vlan_id 3037 } 3038 3039 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3040 3041 for (k, v) in six.iteritems(path_params): 3042 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3043 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3044 3045 header_params = { 3046 "accept": "application/json", 3047 "content-type": "application/json", 3048 "if-match": kwargs.get("if_match", missing), 3049 "opc-request-id": kwargs.get("opc_request_id", missing), 3050 "opc-retry-token": kwargs.get("opc_retry_token", missing) 3051 } 3052 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3053 3054 retry_strategy = self.base_client.get_preferred_retry_strategy( 3055 operation_retry_strategy=kwargs.get('retry_strategy'), 3056 client_retry_strategy=self.retry_strategy 3057 ) 3058 3059 if retry_strategy: 3060 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3061 self.base_client.add_opc_retry_token_if_needed(header_params) 3062 self.base_client.add_opc_client_retries_header(header_params) 3063 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3064 return retry_strategy.make_retrying_call( 3065 self.base_client.call_api, 3066 resource_path=resource_path, 3067 method=method, 3068 path_params=path_params, 3069 header_params=header_params, 3070 body=change_vlan_compartment_details) 3071 else: 3072 return self.base_client.call_api( 3073 resource_path=resource_path, 3074 method=method, 3075 path_params=path_params, 3076 header_params=header_params, 3077 body=change_vlan_compartment_details) 3078 3079 def connect_local_peering_gateways(self, local_peering_gateway_id, connect_local_peering_gateways_details, **kwargs): 3080 """ 3081 Connects this local peering gateway (LPG) to another one in the same region. 3082 3083 This operation must be called by the VCN administrator who is designated as 3084 the *requestor* in the peering relationship. The *acceptor* must implement 3085 an Identity and Access Management (IAM) policy that gives the requestor permission 3086 to connect to LPGs in the acceptor's compartment. Without that permission, this 3087 operation will fail. For more information, see 3088 `VCN Peering`__. 3089 3090 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm 3091 3092 3093 :param str local_peering_gateway_id: (required) 3094 The `OCID`__ of the local peering gateway. 3095 3096 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 3097 3098 :param oci.core.models.ConnectLocalPeeringGatewaysDetails connect_local_peering_gateways_details: (required) 3099 Details regarding the local peering gateway to connect. 3100 3101 :param obj retry_strategy: (optional) 3102 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3103 3104 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. 3105 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3106 3107 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3108 3109 :return: A :class:`~oci.response.Response` object with data of type None 3110 :rtype: :class:`~oci.response.Response` 3111 3112 :example: 3113 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/connect_local_peering_gateways.py.html>`__ to see an example of how to use connect_local_peering_gateways API. 3114 """ 3115 resource_path = "/localPeeringGateways/{localPeeringGatewayId}/actions/connect" 3116 method = "POST" 3117 3118 expected_kwargs = ["retry_strategy"] 3119 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3120 if extra_kwargs: 3121 raise ValueError( 3122 "connect_local_peering_gateways got unknown kwargs: {!r}".format(extra_kwargs)) 3123 3124 path_params = { 3125 "localPeeringGatewayId": local_peering_gateway_id 3126 } 3127 3128 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3129 3130 for (k, v) in six.iteritems(path_params): 3131 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3132 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3133 3134 header_params = { 3135 "accept": "application/json", 3136 "content-type": "application/json" 3137 } 3138 3139 retry_strategy = self.base_client.get_preferred_retry_strategy( 3140 operation_retry_strategy=kwargs.get('retry_strategy'), 3141 client_retry_strategy=self.retry_strategy 3142 ) 3143 3144 if retry_strategy: 3145 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3146 self.base_client.add_opc_client_retries_header(header_params) 3147 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3148 return retry_strategy.make_retrying_call( 3149 self.base_client.call_api, 3150 resource_path=resource_path, 3151 method=method, 3152 path_params=path_params, 3153 header_params=header_params, 3154 body=connect_local_peering_gateways_details) 3155 else: 3156 return self.base_client.call_api( 3157 resource_path=resource_path, 3158 method=method, 3159 path_params=path_params, 3160 header_params=header_params, 3161 body=connect_local_peering_gateways_details) 3162 3163 def connect_remote_peering_connections(self, remote_peering_connection_id, connect_remote_peering_connections_details, **kwargs): 3164 """ 3165 Connects this RPC to another one in a different region. 3166 3167 This operation must be called by the VCN administrator who is designated as 3168 the *requestor* in the peering relationship. The *acceptor* must implement 3169 an Identity and Access Management (IAM) policy that gives the requestor permission 3170 to connect to RPCs in the acceptor's compartment. Without that permission, this 3171 operation will fail. For more information, see 3172 `VCN Peering`__. 3173 3174 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm 3175 3176 3177 :param str remote_peering_connection_id: (required) 3178 The `OCID`__ of the remote peering connection (RPC). 3179 3180 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 3181 3182 :param oci.core.models.ConnectRemotePeeringConnectionsDetails connect_remote_peering_connections_details: (required) 3183 Details to connect peering connection with peering connection from remote region 3184 3185 :param obj retry_strategy: (optional) 3186 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3187 3188 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. 3189 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3190 3191 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3192 3193 :return: A :class:`~oci.response.Response` object with data of type None 3194 :rtype: :class:`~oci.response.Response` 3195 3196 :example: 3197 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/connect_remote_peering_connections.py.html>`__ to see an example of how to use connect_remote_peering_connections API. 3198 """ 3199 resource_path = "/remotePeeringConnections/{remotePeeringConnectionId}/actions/connect" 3200 method = "POST" 3201 3202 expected_kwargs = ["retry_strategy"] 3203 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3204 if extra_kwargs: 3205 raise ValueError( 3206 "connect_remote_peering_connections got unknown kwargs: {!r}".format(extra_kwargs)) 3207 3208 path_params = { 3209 "remotePeeringConnectionId": remote_peering_connection_id 3210 } 3211 3212 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3213 3214 for (k, v) in six.iteritems(path_params): 3215 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3216 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3217 3218 header_params = { 3219 "accept": "application/json", 3220 "content-type": "application/json" 3221 } 3222 3223 retry_strategy = self.base_client.get_preferred_retry_strategy( 3224 operation_retry_strategy=kwargs.get('retry_strategy'), 3225 client_retry_strategy=self.retry_strategy 3226 ) 3227 3228 if retry_strategy: 3229 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3230 self.base_client.add_opc_client_retries_header(header_params) 3231 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3232 return retry_strategy.make_retrying_call( 3233 self.base_client.call_api, 3234 resource_path=resource_path, 3235 method=method, 3236 path_params=path_params, 3237 header_params=header_params, 3238 body=connect_remote_peering_connections_details) 3239 else: 3240 return self.base_client.call_api( 3241 resource_path=resource_path, 3242 method=method, 3243 path_params=path_params, 3244 header_params=header_params, 3245 body=connect_remote_peering_connections_details) 3246 3247 def create_byoip_range(self, create_byoip_range_details, **kwargs): 3248 """ 3249 Creates a subrange of the BYOIP CIDR block. 3250 3251 3252 :param oci.core.models.CreateByoipRangeDetails create_byoip_range_details: (required) 3253 Details needed to create a BYOIP CIDR block subrange. 3254 3255 :param str opc_request_id: (optional) 3256 Unique identifier for the request. 3257 If you need to contact Oracle about a particular request, please provide the request ID. 3258 3259 :param str opc_retry_token: (optional) 3260 A token that uniquely identifies a request so it can be retried in case of a timeout or 3261 server error without risk of executing that same action again. Retry tokens expire after 24 3262 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3263 has been deleted and purged from the system, then a retry of the original creation request 3264 may be rejected). 3265 3266 :param obj retry_strategy: (optional) 3267 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3268 3269 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. 3270 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3271 3272 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3273 3274 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipRange` 3275 :rtype: :class:`~oci.response.Response` 3276 3277 :example: 3278 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_byoip_range.py.html>`__ to see an example of how to use create_byoip_range API. 3279 """ 3280 resource_path = "/byoipRanges" 3281 method = "POST" 3282 3283 # Don't accept unknown kwargs 3284 expected_kwargs = [ 3285 "retry_strategy", 3286 "opc_request_id", 3287 "opc_retry_token" 3288 ] 3289 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3290 if extra_kwargs: 3291 raise ValueError( 3292 "create_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) 3293 3294 header_params = { 3295 "accept": "application/json", 3296 "content-type": "application/json", 3297 "opc-request-id": kwargs.get("opc_request_id", missing), 3298 "opc-retry-token": kwargs.get("opc_retry_token", missing) 3299 } 3300 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3301 3302 retry_strategy = self.base_client.get_preferred_retry_strategy( 3303 operation_retry_strategy=kwargs.get('retry_strategy'), 3304 client_retry_strategy=self.retry_strategy 3305 ) 3306 3307 if retry_strategy: 3308 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3309 self.base_client.add_opc_retry_token_if_needed(header_params) 3310 self.base_client.add_opc_client_retries_header(header_params) 3311 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3312 return retry_strategy.make_retrying_call( 3313 self.base_client.call_api, 3314 resource_path=resource_path, 3315 method=method, 3316 header_params=header_params, 3317 body=create_byoip_range_details, 3318 response_type="ByoipRange") 3319 else: 3320 return self.base_client.call_api( 3321 resource_path=resource_path, 3322 method=method, 3323 header_params=header_params, 3324 body=create_byoip_range_details, 3325 response_type="ByoipRange") 3326 3327 def create_cpe(self, create_cpe_details, **kwargs): 3328 """ 3329 Creates a new virtual customer-premises equipment (CPE) object in the specified compartment. For 3330 more information, see `Site-to-Site VPN Overview`__. 3331 3332 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want 3333 the CPE to reside. Notice that the CPE doesn't have to be in the same compartment as the IPSec 3334 connection or other Networking Service components. If you're not sure which compartment to 3335 use, put the CPE in the same compartment as the DRG. For more information about 3336 compartments and access control, see `Overview of the IAM Service`__. 3337 For information about OCIDs, see `Resource Identifiers`__. 3338 3339 You must provide the public IP address of your on-premises router. See 3340 `CPE Configuration`__. 3341 3342 You may optionally specify a *display name* for the CPE, otherwise a default is provided. It does not have to 3343 be unique, and you can change it. Avoid entering confidential information. 3344 3345 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/overviewIPsec.htm 3346 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 3347 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 3348 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 3349 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/configuringCPE.htm 3350 3351 3352 :param oci.core.models.CreateCpeDetails create_cpe_details: (required) 3353 Details for creating a CPE. 3354 3355 :param str opc_retry_token: (optional) 3356 A token that uniquely identifies a request so it can be retried in case of a timeout or 3357 server error without risk of executing that same action again. Retry tokens expire after 24 3358 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3359 has been deleted and purged from the system, then a retry of the original creation request 3360 may be rejected). 3361 3362 :param obj retry_strategy: (optional) 3363 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3364 3365 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. 3366 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3367 3368 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3369 3370 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Cpe` 3371 :rtype: :class:`~oci.response.Response` 3372 3373 :example: 3374 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_cpe.py.html>`__ to see an example of how to use create_cpe API. 3375 """ 3376 resource_path = "/cpes" 3377 method = "POST" 3378 3379 # Don't accept unknown kwargs 3380 expected_kwargs = [ 3381 "retry_strategy", 3382 "opc_retry_token" 3383 ] 3384 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3385 if extra_kwargs: 3386 raise ValueError( 3387 "create_cpe got unknown kwargs: {!r}".format(extra_kwargs)) 3388 3389 header_params = { 3390 "accept": "application/json", 3391 "content-type": "application/json", 3392 "opc-retry-token": kwargs.get("opc_retry_token", missing) 3393 } 3394 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3395 3396 retry_strategy = self.base_client.get_preferred_retry_strategy( 3397 operation_retry_strategy=kwargs.get('retry_strategy'), 3398 client_retry_strategy=self.retry_strategy 3399 ) 3400 3401 if retry_strategy: 3402 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3403 self.base_client.add_opc_retry_token_if_needed(header_params) 3404 self.base_client.add_opc_client_retries_header(header_params) 3405 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3406 return retry_strategy.make_retrying_call( 3407 self.base_client.call_api, 3408 resource_path=resource_path, 3409 method=method, 3410 header_params=header_params, 3411 body=create_cpe_details, 3412 response_type="Cpe") 3413 else: 3414 return self.base_client.call_api( 3415 resource_path=resource_path, 3416 method=method, 3417 header_params=header_params, 3418 body=create_cpe_details, 3419 response_type="Cpe") 3420 3421 def create_cross_connect(self, create_cross_connect_details, **kwargs): 3422 """ 3423 Creates a new cross-connect. Oracle recommends you create each cross-connect in a 3424 :class:`CrossConnectGroup` so you can use link aggregation 3425 with the connection. 3426 3427 After creating the `CrossConnect` object, you need to go the FastConnect location 3428 and request to have the physical cable installed. For more information, see 3429 `FastConnect Overview`__. 3430 3431 For the purposes of access control, you must provide the `OCID`__ of the 3432 compartment where you want the cross-connect to reside. If you're 3433 not sure which compartment to use, put the cross-connect in the 3434 same compartment with your VCN. For more information about 3435 compartments and access control, see 3436 `Overview of the IAM Service`__. 3437 For information about OCIDs, see 3438 `Resource Identifiers`__. 3439 3440 You may optionally specify a *display name* for the cross-connect. 3441 It does not have to be unique, and you can change it. Avoid entering confidential information. 3442 3443 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm 3444 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 3445 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 3446 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 3447 3448 3449 :param oci.core.models.CreateCrossConnectDetails create_cross_connect_details: (required) 3450 Details to create a CrossConnect 3451 3452 :param str opc_retry_token: (optional) 3453 A token that uniquely identifies a request so it can be retried in case of a timeout or 3454 server error without risk of executing that same action again. Retry tokens expire after 24 3455 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3456 has been deleted and purged from the system, then a retry of the original creation request 3457 may be rejected). 3458 3459 :param obj retry_strategy: (optional) 3460 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3461 3462 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. 3463 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3464 3465 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3466 3467 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.CrossConnect` 3468 :rtype: :class:`~oci.response.Response` 3469 3470 :example: 3471 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_cross_connect.py.html>`__ to see an example of how to use create_cross_connect API. 3472 """ 3473 resource_path = "/crossConnects" 3474 method = "POST" 3475 3476 # Don't accept unknown kwargs 3477 expected_kwargs = [ 3478 "retry_strategy", 3479 "opc_retry_token" 3480 ] 3481 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3482 if extra_kwargs: 3483 raise ValueError( 3484 "create_cross_connect got unknown kwargs: {!r}".format(extra_kwargs)) 3485 3486 header_params = { 3487 "accept": "application/json", 3488 "content-type": "application/json", 3489 "opc-retry-token": kwargs.get("opc_retry_token", missing) 3490 } 3491 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3492 3493 retry_strategy = self.base_client.get_preferred_retry_strategy( 3494 operation_retry_strategy=kwargs.get('retry_strategy'), 3495 client_retry_strategy=self.retry_strategy 3496 ) 3497 3498 if retry_strategy: 3499 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3500 self.base_client.add_opc_retry_token_if_needed(header_params) 3501 self.base_client.add_opc_client_retries_header(header_params) 3502 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3503 return retry_strategy.make_retrying_call( 3504 self.base_client.call_api, 3505 resource_path=resource_path, 3506 method=method, 3507 header_params=header_params, 3508 body=create_cross_connect_details, 3509 response_type="CrossConnect") 3510 else: 3511 return self.base_client.call_api( 3512 resource_path=resource_path, 3513 method=method, 3514 header_params=header_params, 3515 body=create_cross_connect_details, 3516 response_type="CrossConnect") 3517 3518 def create_cross_connect_group(self, create_cross_connect_group_details, **kwargs): 3519 """ 3520 Creates a new cross-connect group to use with Oracle Cloud Infrastructure 3521 FastConnect. For more information, see 3522 `FastConnect Overview`__. 3523 3524 For the purposes of access control, you must provide the `OCID`__ of the 3525 compartment where you want the cross-connect group to reside. If you're 3526 not sure which compartment to use, put the cross-connect group in the 3527 same compartment with your VCN. For more information about 3528 compartments and access control, see 3529 `Overview of the IAM Service`__. 3530 For information about OCIDs, see 3531 `Resource Identifiers`__. 3532 3533 You may optionally specify a *display name* for the cross-connect group. 3534 It does not have to be unique, and you can change it. Avoid entering confidential information. 3535 3536 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm 3537 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 3538 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 3539 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 3540 3541 3542 :param oci.core.models.CreateCrossConnectGroupDetails create_cross_connect_group_details: (required) 3543 Details to create a CrossConnectGroup 3544 3545 :param str opc_retry_token: (optional) 3546 A token that uniquely identifies a request so it can be retried in case of a timeout or 3547 server error without risk of executing that same action again. Retry tokens expire after 24 3548 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3549 has been deleted and purged from the system, then a retry of the original creation request 3550 may be rejected). 3551 3552 :param obj retry_strategy: (optional) 3553 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3554 3555 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. 3556 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3557 3558 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3559 3560 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.CrossConnectGroup` 3561 :rtype: :class:`~oci.response.Response` 3562 3563 :example: 3564 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_cross_connect_group.py.html>`__ to see an example of how to use create_cross_connect_group API. 3565 """ 3566 resource_path = "/crossConnectGroups" 3567 method = "POST" 3568 3569 # Don't accept unknown kwargs 3570 expected_kwargs = [ 3571 "retry_strategy", 3572 "opc_retry_token" 3573 ] 3574 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3575 if extra_kwargs: 3576 raise ValueError( 3577 "create_cross_connect_group got unknown kwargs: {!r}".format(extra_kwargs)) 3578 3579 header_params = { 3580 "accept": "application/json", 3581 "content-type": "application/json", 3582 "opc-retry-token": kwargs.get("opc_retry_token", missing) 3583 } 3584 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3585 3586 retry_strategy = self.base_client.get_preferred_retry_strategy( 3587 operation_retry_strategy=kwargs.get('retry_strategy'), 3588 client_retry_strategy=self.retry_strategy 3589 ) 3590 3591 if retry_strategy: 3592 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3593 self.base_client.add_opc_retry_token_if_needed(header_params) 3594 self.base_client.add_opc_client_retries_header(header_params) 3595 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3596 return retry_strategy.make_retrying_call( 3597 self.base_client.call_api, 3598 resource_path=resource_path, 3599 method=method, 3600 header_params=header_params, 3601 body=create_cross_connect_group_details, 3602 response_type="CrossConnectGroup") 3603 else: 3604 return self.base_client.call_api( 3605 resource_path=resource_path, 3606 method=method, 3607 header_params=header_params, 3608 body=create_cross_connect_group_details, 3609 response_type="CrossConnectGroup") 3610 3611 def create_dhcp_options(self, create_dhcp_details, **kwargs): 3612 """ 3613 Creates a new set of DHCP options for the specified VCN. For more information, see 3614 :class:`DhcpOptions`. 3615 3616 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want the set of 3617 DHCP options to reside. Notice that the set of options doesn't have to be in the same compartment as the VCN, 3618 subnets, or other Networking Service components. If you're not sure which compartment to use, put the set 3619 of DHCP options in the same compartment as the VCN. For more information about compartments and access control, see 3620 `Overview of the IAM Service`__. For information about OCIDs, see 3621 `Resource Identifiers`__. 3622 3623 You may optionally specify a *display name* for the set of DHCP options, otherwise a default is provided. 3624 It does not have to be unique, and you can change it. Avoid entering confidential information. 3625 3626 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 3627 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 3628 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 3629 3630 3631 :param oci.core.models.CreateDhcpDetails create_dhcp_details: (required) 3632 Request object for creating a new set of DHCP options. 3633 3634 :param str opc_retry_token: (optional) 3635 A token that uniquely identifies a request so it can be retried in case of a timeout or 3636 server error without risk of executing that same action again. Retry tokens expire after 24 3637 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3638 has been deleted and purged from the system, then a retry of the original creation request 3639 may be rejected). 3640 3641 :param obj retry_strategy: (optional) 3642 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3643 3644 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. 3645 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3646 3647 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3648 3649 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DhcpOptions` 3650 :rtype: :class:`~oci.response.Response` 3651 3652 :example: 3653 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_dhcp_options.py.html>`__ to see an example of how to use create_dhcp_options API. 3654 """ 3655 resource_path = "/dhcps" 3656 method = "POST" 3657 3658 # Don't accept unknown kwargs 3659 expected_kwargs = [ 3660 "retry_strategy", 3661 "opc_retry_token" 3662 ] 3663 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3664 if extra_kwargs: 3665 raise ValueError( 3666 "create_dhcp_options got unknown kwargs: {!r}".format(extra_kwargs)) 3667 3668 header_params = { 3669 "accept": "application/json", 3670 "content-type": "application/json", 3671 "opc-retry-token": kwargs.get("opc_retry_token", missing) 3672 } 3673 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3674 3675 retry_strategy = self.base_client.get_preferred_retry_strategy( 3676 operation_retry_strategy=kwargs.get('retry_strategy'), 3677 client_retry_strategy=self.retry_strategy 3678 ) 3679 3680 if retry_strategy: 3681 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3682 self.base_client.add_opc_retry_token_if_needed(header_params) 3683 self.base_client.add_opc_client_retries_header(header_params) 3684 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3685 return retry_strategy.make_retrying_call( 3686 self.base_client.call_api, 3687 resource_path=resource_path, 3688 method=method, 3689 header_params=header_params, 3690 body=create_dhcp_details, 3691 response_type="DhcpOptions") 3692 else: 3693 return self.base_client.call_api( 3694 resource_path=resource_path, 3695 method=method, 3696 header_params=header_params, 3697 body=create_dhcp_details, 3698 response_type="DhcpOptions") 3699 3700 def create_drg(self, create_drg_details, **kwargs): 3701 """ 3702 Creates a new dynamic routing gateway (DRG) in the specified compartment. For more information, 3703 see `Dynamic Routing Gateways (DRGs)`__. 3704 3705 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want 3706 the DRG to reside. Notice that the DRG doesn't have to be in the same compartment as the VCN, 3707 the DRG attachment, or other Networking Service components. If you're not sure which compartment 3708 to use, put the DRG in the same compartment as the VCN. For more information about compartments 3709 and access control, see `Overview of the IAM Service`__. 3710 For information about OCIDs, see `Resource Identifiers`__. 3711 3712 You may optionally specify a *display name* for the DRG, otherwise a default is provided. 3713 It does not have to be unique, and you can change it. Avoid entering confidential information. 3714 3715 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingDRGs.htm 3716 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 3717 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 3718 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 3719 3720 3721 :param oci.core.models.CreateDrgDetails create_drg_details: (required) 3722 Details for creating a DRG. 3723 3724 :param str opc_retry_token: (optional) 3725 A token that uniquely identifies a request so it can be retried in case of a timeout or 3726 server error without risk of executing that same action again. Retry tokens expire after 24 3727 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3728 has been deleted and purged from the system, then a retry of the original creation request 3729 may be rejected). 3730 3731 :param obj retry_strategy: (optional) 3732 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3733 3734 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. 3735 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3736 3737 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3738 3739 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Drg` 3740 :rtype: :class:`~oci.response.Response` 3741 3742 :example: 3743 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_drg.py.html>`__ to see an example of how to use create_drg API. 3744 """ 3745 resource_path = "/drgs" 3746 method = "POST" 3747 3748 # Don't accept unknown kwargs 3749 expected_kwargs = [ 3750 "retry_strategy", 3751 "opc_retry_token" 3752 ] 3753 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3754 if extra_kwargs: 3755 raise ValueError( 3756 "create_drg got unknown kwargs: {!r}".format(extra_kwargs)) 3757 3758 header_params = { 3759 "accept": "application/json", 3760 "content-type": "application/json", 3761 "opc-retry-token": kwargs.get("opc_retry_token", missing) 3762 } 3763 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3764 3765 retry_strategy = self.base_client.get_preferred_retry_strategy( 3766 operation_retry_strategy=kwargs.get('retry_strategy'), 3767 client_retry_strategy=self.retry_strategy 3768 ) 3769 3770 if retry_strategy: 3771 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3772 self.base_client.add_opc_retry_token_if_needed(header_params) 3773 self.base_client.add_opc_client_retries_header(header_params) 3774 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3775 return retry_strategy.make_retrying_call( 3776 self.base_client.call_api, 3777 resource_path=resource_path, 3778 method=method, 3779 header_params=header_params, 3780 body=create_drg_details, 3781 response_type="Drg") 3782 else: 3783 return self.base_client.call_api( 3784 resource_path=resource_path, 3785 method=method, 3786 header_params=header_params, 3787 body=create_drg_details, 3788 response_type="Drg") 3789 3790 def create_drg_attachment(self, create_drg_attachment_details, **kwargs): 3791 """ 3792 Attaches the specified DRG to the specified network resource. A VCN can be attached to only one DRG 3793 at a time, but a DRG can be attached to more than one VCN. The response includes a `DrgAttachment` 3794 object with its own `OCID`__. For more information about DRGs, see 3795 `Dynamic Routing Gateways (DRGs)`__. 3796 3797 You may optionally specify a *display name* for the attachment, otherwise a default is provided. 3798 It does not have to be unique, and you can change it. Avoid entering confidential information. 3799 3800 For the purposes of access control, the DRG attachment is automatically placed into the currently selected compartment. 3801 For more information about compartments and access control, see 3802 `Overview of the IAM Service`__. 3803 3804 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 3805 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingDRGs.htm 3806 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 3807 3808 3809 :param oci.core.models.CreateDrgAttachmentDetails create_drg_attachment_details: (required) 3810 Details for creating a `DrgAttachment`. 3811 3812 :param str opc_retry_token: (optional) 3813 A token that uniquely identifies a request so it can be retried in case of a timeout or 3814 server error without risk of executing that same action again. Retry tokens expire after 24 3815 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3816 has been deleted and purged from the system, then a retry of the original creation request 3817 may be rejected). 3818 3819 :param obj retry_strategy: (optional) 3820 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3821 3822 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. 3823 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3824 3825 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3826 3827 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgAttachment` 3828 :rtype: :class:`~oci.response.Response` 3829 3830 :example: 3831 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_drg_attachment.py.html>`__ to see an example of how to use create_drg_attachment API. 3832 """ 3833 resource_path = "/drgAttachments" 3834 method = "POST" 3835 3836 # Don't accept unknown kwargs 3837 expected_kwargs = [ 3838 "retry_strategy", 3839 "opc_retry_token" 3840 ] 3841 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3842 if extra_kwargs: 3843 raise ValueError( 3844 "create_drg_attachment got unknown kwargs: {!r}".format(extra_kwargs)) 3845 3846 header_params = { 3847 "accept": "application/json", 3848 "content-type": "application/json", 3849 "opc-retry-token": kwargs.get("opc_retry_token", missing) 3850 } 3851 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3852 3853 retry_strategy = self.base_client.get_preferred_retry_strategy( 3854 operation_retry_strategy=kwargs.get('retry_strategy'), 3855 client_retry_strategy=self.retry_strategy 3856 ) 3857 3858 if retry_strategy: 3859 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3860 self.base_client.add_opc_retry_token_if_needed(header_params) 3861 self.base_client.add_opc_client_retries_header(header_params) 3862 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3863 return retry_strategy.make_retrying_call( 3864 self.base_client.call_api, 3865 resource_path=resource_path, 3866 method=method, 3867 header_params=header_params, 3868 body=create_drg_attachment_details, 3869 response_type="DrgAttachment") 3870 else: 3871 return self.base_client.call_api( 3872 resource_path=resource_path, 3873 method=method, 3874 header_params=header_params, 3875 body=create_drg_attachment_details, 3876 response_type="DrgAttachment") 3877 3878 def create_drg_route_distribution(self, create_drg_route_distribution_details, **kwargs): 3879 """ 3880 Creates a new route distribution for the specified DRG. 3881 Assign the route distribution as an import distribution to a DRG route table using the `UpdateDrgRouteTable` or `CreateDrgRouteTable` operations. 3882 Assign the route distribution as an export distribution to a DRG attachment 3883 using the `UpdateDrgAttachment` or `CreateDrgAttachment` operations. 3884 3885 3886 :param oci.core.models.CreateDrgRouteDistributionDetails create_drg_route_distribution_details: (required) 3887 Details for creating a route distribution. 3888 3889 :param str opc_retry_token: (optional) 3890 A token that uniquely identifies a request so it can be retried in case of a timeout or 3891 server error without risk of executing that same action again. Retry tokens expire after 24 3892 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3893 has been deleted and purged from the system, then a retry of the original creation request 3894 may be rejected). 3895 3896 :param obj retry_strategy: (optional) 3897 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3898 3899 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. 3900 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3901 3902 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3903 3904 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgRouteDistribution` 3905 :rtype: :class:`~oci.response.Response` 3906 3907 :example: 3908 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_drg_route_distribution.py.html>`__ to see an example of how to use create_drg_route_distribution API. 3909 """ 3910 resource_path = "/drgRouteDistributions" 3911 method = "POST" 3912 3913 # Don't accept unknown kwargs 3914 expected_kwargs = [ 3915 "retry_strategy", 3916 "opc_retry_token" 3917 ] 3918 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3919 if extra_kwargs: 3920 raise ValueError( 3921 "create_drg_route_distribution got unknown kwargs: {!r}".format(extra_kwargs)) 3922 3923 header_params = { 3924 "accept": "application/json", 3925 "content-type": "application/json", 3926 "opc-retry-token": kwargs.get("opc_retry_token", missing) 3927 } 3928 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3929 3930 retry_strategy = self.base_client.get_preferred_retry_strategy( 3931 operation_retry_strategy=kwargs.get('retry_strategy'), 3932 client_retry_strategy=self.retry_strategy 3933 ) 3934 3935 if retry_strategy: 3936 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3937 self.base_client.add_opc_retry_token_if_needed(header_params) 3938 self.base_client.add_opc_client_retries_header(header_params) 3939 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3940 return retry_strategy.make_retrying_call( 3941 self.base_client.call_api, 3942 resource_path=resource_path, 3943 method=method, 3944 header_params=header_params, 3945 body=create_drg_route_distribution_details, 3946 response_type="DrgRouteDistribution") 3947 else: 3948 return self.base_client.call_api( 3949 resource_path=resource_path, 3950 method=method, 3951 header_params=header_params, 3952 body=create_drg_route_distribution_details, 3953 response_type="DrgRouteDistribution") 3954 3955 def create_drg_route_table(self, create_drg_route_table_details, **kwargs): 3956 """ 3957 Creates a new DRG route table for the specified DRG. Assign the DRG route table to a DRG attachment 3958 using the `UpdateDrgAttachment` or `CreateDrgAttachment` operations. 3959 3960 3961 :param oci.core.models.CreateDrgRouteTableDetails create_drg_route_table_details: (required) 3962 Details for creating a DRG route table. 3963 3964 :param str opc_retry_token: (optional) 3965 A token that uniquely identifies a request so it can be retried in case of a timeout or 3966 server error without risk of executing that same action again. Retry tokens expire after 24 3967 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 3968 has been deleted and purged from the system, then a retry of the original creation request 3969 may be rejected). 3970 3971 :param obj retry_strategy: (optional) 3972 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3973 3974 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. 3975 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3976 3977 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3978 3979 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgRouteTable` 3980 :rtype: :class:`~oci.response.Response` 3981 3982 :example: 3983 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_drg_route_table.py.html>`__ to see an example of how to use create_drg_route_table API. 3984 """ 3985 resource_path = "/drgRouteTables" 3986 method = "POST" 3987 3988 # Don't accept unknown kwargs 3989 expected_kwargs = [ 3990 "retry_strategy", 3991 "opc_retry_token" 3992 ] 3993 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3994 if extra_kwargs: 3995 raise ValueError( 3996 "create_drg_route_table got unknown kwargs: {!r}".format(extra_kwargs)) 3997 3998 header_params = { 3999 "accept": "application/json", 4000 "content-type": "application/json", 4001 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4002 } 4003 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4004 4005 retry_strategy = self.base_client.get_preferred_retry_strategy( 4006 operation_retry_strategy=kwargs.get('retry_strategy'), 4007 client_retry_strategy=self.retry_strategy 4008 ) 4009 4010 if retry_strategy: 4011 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4012 self.base_client.add_opc_retry_token_if_needed(header_params) 4013 self.base_client.add_opc_client_retries_header(header_params) 4014 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4015 return retry_strategy.make_retrying_call( 4016 self.base_client.call_api, 4017 resource_path=resource_path, 4018 method=method, 4019 header_params=header_params, 4020 body=create_drg_route_table_details, 4021 response_type="DrgRouteTable") 4022 else: 4023 return self.base_client.call_api( 4024 resource_path=resource_path, 4025 method=method, 4026 header_params=header_params, 4027 body=create_drg_route_table_details, 4028 response_type="DrgRouteTable") 4029 4030 def create_internet_gateway(self, create_internet_gateway_details, **kwargs): 4031 """ 4032 Creates a new internet gateway for the specified VCN. For more information, see 4033 `Access to the Internet`__. 4034 4035 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want the Internet 4036 Gateway to reside. Notice that the internet gateway doesn't have to be in the same compartment as the VCN or 4037 other Networking Service components. If you're not sure which compartment to use, put the Internet 4038 Gateway in the same compartment with the VCN. For more information about compartments and access control, see 4039 `Overview of the IAM Service`__. 4040 4041 You may optionally specify a *display name* for the internet gateway, otherwise a default is provided. It 4042 does not have to be unique, and you can change it. Avoid entering confidential information. 4043 4044 For traffic to flow between a subnet and an internet gateway, you must create a route rule accordingly in 4045 the subnet's route table (for example, 0.0.0.0/0 > internet gateway). See 4046 :func:`update_route_table`. 4047 4048 You must specify whether the internet gateway is enabled when you create it. If it's disabled, that means no 4049 traffic will flow to/from the internet even if there's a route rule that enables that traffic. You can later 4050 use :func:`update_internet_gateway` to easily disable/enable 4051 the gateway without changing the route rule. 4052 4053 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingIGs.htm 4054 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 4055 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 4056 4057 4058 :param oci.core.models.CreateInternetGatewayDetails create_internet_gateway_details: (required) 4059 Details for creating a new internet gateway. 4060 4061 :param str opc_retry_token: (optional) 4062 A token that uniquely identifies a request so it can be retried in case of a timeout or 4063 server error without risk of executing that same action again. Retry tokens expire after 24 4064 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4065 has been deleted and purged from the system, then a retry of the original creation request 4066 may be rejected). 4067 4068 :param obj retry_strategy: (optional) 4069 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4070 4071 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. 4072 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4073 4074 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4075 4076 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.InternetGateway` 4077 :rtype: :class:`~oci.response.Response` 4078 4079 :example: 4080 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_internet_gateway.py.html>`__ to see an example of how to use create_internet_gateway API. 4081 """ 4082 resource_path = "/internetGateways" 4083 method = "POST" 4084 4085 # Don't accept unknown kwargs 4086 expected_kwargs = [ 4087 "retry_strategy", 4088 "opc_retry_token" 4089 ] 4090 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4091 if extra_kwargs: 4092 raise ValueError( 4093 "create_internet_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 4094 4095 header_params = { 4096 "accept": "application/json", 4097 "content-type": "application/json", 4098 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4099 } 4100 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4101 4102 retry_strategy = self.base_client.get_preferred_retry_strategy( 4103 operation_retry_strategy=kwargs.get('retry_strategy'), 4104 client_retry_strategy=self.retry_strategy 4105 ) 4106 4107 if retry_strategy: 4108 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4109 self.base_client.add_opc_retry_token_if_needed(header_params) 4110 self.base_client.add_opc_client_retries_header(header_params) 4111 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4112 return retry_strategy.make_retrying_call( 4113 self.base_client.call_api, 4114 resource_path=resource_path, 4115 method=method, 4116 header_params=header_params, 4117 body=create_internet_gateway_details, 4118 response_type="InternetGateway") 4119 else: 4120 return self.base_client.call_api( 4121 resource_path=resource_path, 4122 method=method, 4123 header_params=header_params, 4124 body=create_internet_gateway_details, 4125 response_type="InternetGateway") 4126 4127 def create_ip_sec_connection(self, create_ip_sec_connection_details, **kwargs): 4128 """ 4129 Creates a new IPSec connection between the specified DRG and CPE. For more information, see 4130 `Site-to-Site VPN Overview`__. 4131 4132 If you configure at least one tunnel to use static routing, then in the request you must provide 4133 at least one valid static route (you're allowed a maximum of 10). For example: 10.0.0.0/16. 4134 If you configure both tunnels to use BGP dynamic routing, you can provide an empty list for 4135 the static routes. For more information, see the important note in 4136 :class:`IPSecConnection`. 4137 4138 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want the 4139 IPSec connection to reside. Notice that the IPSec connection doesn't have to be in the same compartment 4140 as the DRG, CPE, or other Networking Service components. If you're not sure which compartment to 4141 use, put the IPSec connection in the same compartment as the DRG. For more information about 4142 compartments and access control, see 4143 `Overview of the IAM Service`__. 4144 4145 You may optionally specify a *display name* for the IPSec connection, otherwise a default is provided. 4146 It does not have to be unique, and you can change it. Avoid entering confidential information. 4147 4148 After creating the IPSec connection, you need to configure your on-premises router 4149 with tunnel-specific information. For tunnel status and the required configuration information, see: 4150 4151 * :class:`IPSecConnectionTunnel` 4152 * :class:`IPSecConnectionTunnelSharedSecret` 4153 4154 For each tunnel, you need the IP address of Oracle's VPN headend and the shared secret 4155 (that is, the pre-shared key). For more information, see 4156 `CPE Configuration`__. 4157 4158 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/overviewIPsec.htm 4159 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 4160 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 4161 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/configuringCPE.htm 4162 4163 4164 :param oci.core.models.CreateIPSecConnectionDetails create_ip_sec_connection_details: (required) 4165 Details for creating an `IPSecConnection`. 4166 4167 :param str opc_retry_token: (optional) 4168 A token that uniquely identifies a request so it can be retried in case of a timeout or 4169 server error without risk of executing that same action again. Retry tokens expire after 24 4170 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4171 has been deleted and purged from the system, then a retry of the original creation request 4172 may be rejected). 4173 4174 :param obj retry_strategy: (optional) 4175 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4176 4177 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. 4178 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4179 4180 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4181 4182 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnection` 4183 :rtype: :class:`~oci.response.Response` 4184 4185 :example: 4186 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_ip_sec_connection.py.html>`__ to see an example of how to use create_ip_sec_connection API. 4187 """ 4188 resource_path = "/ipsecConnections" 4189 method = "POST" 4190 4191 # Don't accept unknown kwargs 4192 expected_kwargs = [ 4193 "retry_strategy", 4194 "opc_retry_token" 4195 ] 4196 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4197 if extra_kwargs: 4198 raise ValueError( 4199 "create_ip_sec_connection got unknown kwargs: {!r}".format(extra_kwargs)) 4200 4201 header_params = { 4202 "accept": "application/json", 4203 "content-type": "application/json", 4204 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4205 } 4206 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4207 4208 retry_strategy = self.base_client.get_preferred_retry_strategy( 4209 operation_retry_strategy=kwargs.get('retry_strategy'), 4210 client_retry_strategy=self.retry_strategy 4211 ) 4212 4213 if retry_strategy: 4214 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4215 self.base_client.add_opc_retry_token_if_needed(header_params) 4216 self.base_client.add_opc_client_retries_header(header_params) 4217 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4218 return retry_strategy.make_retrying_call( 4219 self.base_client.call_api, 4220 resource_path=resource_path, 4221 method=method, 4222 header_params=header_params, 4223 body=create_ip_sec_connection_details, 4224 response_type="IPSecConnection") 4225 else: 4226 return self.base_client.call_api( 4227 resource_path=resource_path, 4228 method=method, 4229 header_params=header_params, 4230 body=create_ip_sec_connection_details, 4231 response_type="IPSecConnection") 4232 4233 def create_ipv6(self, create_ipv6_details, **kwargs): 4234 """ 4235 Creates an IPv6 for the specified VNIC. 4236 4237 4238 :param oci.core.models.CreateIpv6Details create_ipv6_details: (required) 4239 Create IPv6 details. 4240 4241 :param str opc_request_id: (optional) 4242 Unique identifier for the request. 4243 If you need to contact Oracle about a particular request, please provide the request ID. 4244 4245 :param str opc_retry_token: (optional) 4246 A token that uniquely identifies a request so it can be retried in case of a timeout or 4247 server error without risk of executing that same action again. Retry tokens expire after 24 4248 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4249 has been deleted and purged from the system, then a retry of the original creation request 4250 may be rejected). 4251 4252 :param obj retry_strategy: (optional) 4253 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4254 4255 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. 4256 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4257 4258 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4259 4260 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Ipv6` 4261 :rtype: :class:`~oci.response.Response` 4262 4263 :example: 4264 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_ipv6.py.html>`__ to see an example of how to use create_ipv6 API. 4265 """ 4266 resource_path = "/ipv6" 4267 method = "POST" 4268 4269 # Don't accept unknown kwargs 4270 expected_kwargs = [ 4271 "retry_strategy", 4272 "opc_request_id", 4273 "opc_retry_token" 4274 ] 4275 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4276 if extra_kwargs: 4277 raise ValueError( 4278 "create_ipv6 got unknown kwargs: {!r}".format(extra_kwargs)) 4279 4280 header_params = { 4281 "accept": "application/json", 4282 "content-type": "application/json", 4283 "opc-request-id": kwargs.get("opc_request_id", missing), 4284 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4285 } 4286 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4287 4288 retry_strategy = self.base_client.get_preferred_retry_strategy( 4289 operation_retry_strategy=kwargs.get('retry_strategy'), 4290 client_retry_strategy=self.retry_strategy 4291 ) 4292 4293 if retry_strategy: 4294 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4295 self.base_client.add_opc_retry_token_if_needed(header_params) 4296 self.base_client.add_opc_client_retries_header(header_params) 4297 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4298 return retry_strategy.make_retrying_call( 4299 self.base_client.call_api, 4300 resource_path=resource_path, 4301 method=method, 4302 header_params=header_params, 4303 body=create_ipv6_details, 4304 response_type="Ipv6") 4305 else: 4306 return self.base_client.call_api( 4307 resource_path=resource_path, 4308 method=method, 4309 header_params=header_params, 4310 body=create_ipv6_details, 4311 response_type="Ipv6") 4312 4313 def create_local_peering_gateway(self, create_local_peering_gateway_details, **kwargs): 4314 """ 4315 Creates a new local peering gateway (LPG) for the specified VCN. 4316 4317 4318 :param oci.core.models.CreateLocalPeeringGatewayDetails create_local_peering_gateway_details: (required) 4319 Details for creating a new local peering gateway. 4320 4321 :param str opc_retry_token: (optional) 4322 A token that uniquely identifies a request so it can be retried in case of a timeout or 4323 server error without risk of executing that same action again. Retry tokens expire after 24 4324 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4325 has been deleted and purged from the system, then a retry of the original creation request 4326 may be rejected). 4327 4328 :param obj retry_strategy: (optional) 4329 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4330 4331 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. 4332 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4333 4334 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4335 4336 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.LocalPeeringGateway` 4337 :rtype: :class:`~oci.response.Response` 4338 4339 :example: 4340 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_local_peering_gateway.py.html>`__ to see an example of how to use create_local_peering_gateway API. 4341 """ 4342 resource_path = "/localPeeringGateways" 4343 method = "POST" 4344 4345 # Don't accept unknown kwargs 4346 expected_kwargs = [ 4347 "retry_strategy", 4348 "opc_retry_token" 4349 ] 4350 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4351 if extra_kwargs: 4352 raise ValueError( 4353 "create_local_peering_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 4354 4355 header_params = { 4356 "accept": "application/json", 4357 "content-type": "application/json", 4358 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4359 } 4360 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4361 4362 retry_strategy = self.base_client.get_preferred_retry_strategy( 4363 operation_retry_strategy=kwargs.get('retry_strategy'), 4364 client_retry_strategy=self.retry_strategy 4365 ) 4366 4367 if retry_strategy: 4368 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4369 self.base_client.add_opc_retry_token_if_needed(header_params) 4370 self.base_client.add_opc_client_retries_header(header_params) 4371 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4372 return retry_strategy.make_retrying_call( 4373 self.base_client.call_api, 4374 resource_path=resource_path, 4375 method=method, 4376 header_params=header_params, 4377 body=create_local_peering_gateway_details, 4378 response_type="LocalPeeringGateway") 4379 else: 4380 return self.base_client.call_api( 4381 resource_path=resource_path, 4382 method=method, 4383 header_params=header_params, 4384 body=create_local_peering_gateway_details, 4385 response_type="LocalPeeringGateway") 4386 4387 def create_nat_gateway(self, create_nat_gateway_details, **kwargs): 4388 """ 4389 Creates a new NAT gateway for the specified VCN. You must also set up a route rule with the 4390 NAT gateway as the rule's target. See :class:`RouteTable`. 4391 4392 4393 :param oci.core.models.CreateNatGatewayDetails create_nat_gateway_details: (required) 4394 Details for creating a NAT gateway. 4395 4396 :param str opc_retry_token: (optional) 4397 A token that uniquely identifies a request so it can be retried in case of a timeout or 4398 server error without risk of executing that same action again. Retry tokens expire after 24 4399 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4400 has been deleted and purged from the system, then a retry of the original creation request 4401 may be rejected). 4402 4403 :param obj retry_strategy: (optional) 4404 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4405 4406 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. 4407 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4408 4409 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4410 4411 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.NatGateway` 4412 :rtype: :class:`~oci.response.Response` 4413 4414 :example: 4415 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_nat_gateway.py.html>`__ to see an example of how to use create_nat_gateway API. 4416 """ 4417 resource_path = "/natGateways" 4418 method = "POST" 4419 4420 # Don't accept unknown kwargs 4421 expected_kwargs = [ 4422 "retry_strategy", 4423 "opc_retry_token" 4424 ] 4425 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4426 if extra_kwargs: 4427 raise ValueError( 4428 "create_nat_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 4429 4430 header_params = { 4431 "accept": "application/json", 4432 "content-type": "application/json", 4433 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4434 } 4435 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4436 4437 retry_strategy = self.base_client.get_preferred_retry_strategy( 4438 operation_retry_strategy=kwargs.get('retry_strategy'), 4439 client_retry_strategy=self.retry_strategy 4440 ) 4441 4442 if retry_strategy: 4443 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4444 self.base_client.add_opc_retry_token_if_needed(header_params) 4445 self.base_client.add_opc_client_retries_header(header_params) 4446 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4447 return retry_strategy.make_retrying_call( 4448 self.base_client.call_api, 4449 resource_path=resource_path, 4450 method=method, 4451 header_params=header_params, 4452 body=create_nat_gateway_details, 4453 response_type="NatGateway") 4454 else: 4455 return self.base_client.call_api( 4456 resource_path=resource_path, 4457 method=method, 4458 header_params=header_params, 4459 body=create_nat_gateway_details, 4460 response_type="NatGateway") 4461 4462 def create_network_security_group(self, create_network_security_group_details, **kwargs): 4463 """ 4464 Creates a new network security group for the specified VCN. 4465 4466 4467 :param oci.core.models.CreateNetworkSecurityGroupDetails create_network_security_group_details: (required) 4468 Details for creating a network security group. 4469 4470 :param str opc_retry_token: (optional) 4471 A token that uniquely identifies a request so it can be retried in case of a timeout or 4472 server error without risk of executing that same action again. Retry tokens expire after 24 4473 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4474 has been deleted and purged from the system, then a retry of the original creation request 4475 may be rejected). 4476 4477 :param obj retry_strategy: (optional) 4478 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4479 4480 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. 4481 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4482 4483 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4484 4485 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.NetworkSecurityGroup` 4486 :rtype: :class:`~oci.response.Response` 4487 4488 :example: 4489 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_network_security_group.py.html>`__ to see an example of how to use create_network_security_group API. 4490 """ 4491 resource_path = "/networkSecurityGroups" 4492 method = "POST" 4493 4494 # Don't accept unknown kwargs 4495 expected_kwargs = [ 4496 "retry_strategy", 4497 "opc_retry_token" 4498 ] 4499 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4500 if extra_kwargs: 4501 raise ValueError( 4502 "create_network_security_group got unknown kwargs: {!r}".format(extra_kwargs)) 4503 4504 header_params = { 4505 "accept": "application/json", 4506 "content-type": "application/json", 4507 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4508 } 4509 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4510 4511 retry_strategy = self.base_client.get_preferred_retry_strategy( 4512 operation_retry_strategy=kwargs.get('retry_strategy'), 4513 client_retry_strategy=self.retry_strategy 4514 ) 4515 4516 if retry_strategy: 4517 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4518 self.base_client.add_opc_retry_token_if_needed(header_params) 4519 self.base_client.add_opc_client_retries_header(header_params) 4520 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4521 return retry_strategy.make_retrying_call( 4522 self.base_client.call_api, 4523 resource_path=resource_path, 4524 method=method, 4525 header_params=header_params, 4526 body=create_network_security_group_details, 4527 response_type="NetworkSecurityGroup") 4528 else: 4529 return self.base_client.call_api( 4530 resource_path=resource_path, 4531 method=method, 4532 header_params=header_params, 4533 body=create_network_security_group_details, 4534 response_type="NetworkSecurityGroup") 4535 4536 def create_private_ip(self, create_private_ip_details, **kwargs): 4537 """ 4538 Creates a secondary private IP for the specified VNIC. 4539 For more information about secondary private IPs, see 4540 `IP Addresses`__. 4541 4542 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingIPaddresses.htm 4543 4544 4545 :param oci.core.models.CreatePrivateIpDetails create_private_ip_details: (required) 4546 Create private IP details. 4547 4548 :param str opc_retry_token: (optional) 4549 A token that uniquely identifies a request so it can be retried in case of a timeout or 4550 server error without risk of executing that same action again. Retry tokens expire after 24 4551 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4552 has been deleted and purged from the system, then a retry of the original creation request 4553 may be rejected). 4554 4555 :param obj retry_strategy: (optional) 4556 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4557 4558 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. 4559 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4560 4561 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4562 4563 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PrivateIp` 4564 :rtype: :class:`~oci.response.Response` 4565 4566 :example: 4567 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_private_ip.py.html>`__ to see an example of how to use create_private_ip API. 4568 """ 4569 resource_path = "/privateIps" 4570 method = "POST" 4571 4572 # Don't accept unknown kwargs 4573 expected_kwargs = [ 4574 "retry_strategy", 4575 "opc_retry_token" 4576 ] 4577 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4578 if extra_kwargs: 4579 raise ValueError( 4580 "create_private_ip got unknown kwargs: {!r}".format(extra_kwargs)) 4581 4582 header_params = { 4583 "accept": "application/json", 4584 "content-type": "application/json", 4585 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4586 } 4587 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4588 4589 retry_strategy = self.base_client.get_preferred_retry_strategy( 4590 operation_retry_strategy=kwargs.get('retry_strategy'), 4591 client_retry_strategy=self.retry_strategy 4592 ) 4593 4594 if retry_strategy: 4595 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4596 self.base_client.add_opc_retry_token_if_needed(header_params) 4597 self.base_client.add_opc_client_retries_header(header_params) 4598 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4599 return retry_strategy.make_retrying_call( 4600 self.base_client.call_api, 4601 resource_path=resource_path, 4602 method=method, 4603 header_params=header_params, 4604 body=create_private_ip_details, 4605 response_type="PrivateIp") 4606 else: 4607 return self.base_client.call_api( 4608 resource_path=resource_path, 4609 method=method, 4610 header_params=header_params, 4611 body=create_private_ip_details, 4612 response_type="PrivateIp") 4613 4614 def create_public_ip(self, create_public_ip_details, **kwargs): 4615 """ 4616 Creates a public IP. Use the `lifetime` property to specify whether it's an ephemeral or 4617 reserved public IP. For information about limits on how many you can create, see 4618 `Public IP Addresses`__. 4619 4620 * **For an ephemeral public IP assigned to a private IP:** You must also specify a `privateIpId` 4621 with the `OCID`__ of the primary private IP you want to assign the public IP to. The public IP is 4622 created in the same availability domain as the private IP. An ephemeral public IP must always be 4623 assigned to a private IP, and only to the *primary* private IP on a VNIC, not a secondary 4624 private IP. Exception: If you create a :class:`NatGateway`, Oracle 4625 automatically assigns the NAT gateway a regional ephemeral public IP that you cannot remove. 4626 4627 * **For a reserved public IP:** You may also optionally assign the public IP to a private 4628 IP by specifying `privateIpId`. Or you can later assign the public IP with 4629 :func:`update_public_ip`. 4630 4631 **Note:** When assigning a public IP to a private IP, the private IP must not already have 4632 a public IP with `lifecycleState` = ASSIGNING or ASSIGNED. If it does, an error is returned. 4633 4634 Also, for reserved public IPs, the optional assignment part of this operation is 4635 asynchronous. Poll the public IP's `lifecycleState` to determine if the assignment 4636 succeeded. 4637 4638 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm 4639 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 4640 4641 4642 :param oci.core.models.CreatePublicIpDetails create_public_ip_details: (required) 4643 Create public IP details. 4644 4645 :param str opc_retry_token: (optional) 4646 A token that uniquely identifies a request so it can be retried in case of a timeout or 4647 server error without risk of executing that same action again. Retry tokens expire after 24 4648 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4649 has been deleted and purged from the system, then a retry of the original creation request 4650 may be rejected). 4651 4652 :param obj retry_strategy: (optional) 4653 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4654 4655 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. 4656 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4657 4658 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4659 4660 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIp` 4661 :rtype: :class:`~oci.response.Response` 4662 4663 :example: 4664 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_public_ip.py.html>`__ to see an example of how to use create_public_ip API. 4665 """ 4666 resource_path = "/publicIps" 4667 method = "POST" 4668 4669 # Don't accept unknown kwargs 4670 expected_kwargs = [ 4671 "retry_strategy", 4672 "opc_retry_token" 4673 ] 4674 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4675 if extra_kwargs: 4676 raise ValueError( 4677 "create_public_ip got unknown kwargs: {!r}".format(extra_kwargs)) 4678 4679 header_params = { 4680 "accept": "application/json", 4681 "content-type": "application/json", 4682 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4683 } 4684 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4685 4686 retry_strategy = self.base_client.get_preferred_retry_strategy( 4687 operation_retry_strategy=kwargs.get('retry_strategy'), 4688 client_retry_strategy=self.retry_strategy 4689 ) 4690 4691 if retry_strategy: 4692 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4693 self.base_client.add_opc_retry_token_if_needed(header_params) 4694 self.base_client.add_opc_client_retries_header(header_params) 4695 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4696 return retry_strategy.make_retrying_call( 4697 self.base_client.call_api, 4698 resource_path=resource_path, 4699 method=method, 4700 header_params=header_params, 4701 body=create_public_ip_details, 4702 response_type="PublicIp") 4703 else: 4704 return self.base_client.call_api( 4705 resource_path=resource_path, 4706 method=method, 4707 header_params=header_params, 4708 body=create_public_ip_details, 4709 response_type="PublicIp") 4710 4711 def create_public_ip_pool(self, create_public_ip_pool_details, **kwargs): 4712 """ 4713 Creates a public IP pool. 4714 4715 4716 :param oci.core.models.CreatePublicIpPoolDetails create_public_ip_pool_details: (required) 4717 Create Public Ip Pool details 4718 4719 :param str opc_request_id: (optional) 4720 Unique identifier for the request. 4721 If you need to contact Oracle about a particular request, please provide the request ID. 4722 4723 :param str opc_retry_token: (optional) 4724 A token that uniquely identifies a request so it can be retried in case of a timeout or 4725 server error without risk of executing that same action again. Retry tokens expire after 24 4726 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4727 has been deleted and purged from the system, then a retry of the original creation request 4728 may be rejected). 4729 4730 :param obj retry_strategy: (optional) 4731 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4732 4733 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. 4734 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4735 4736 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4737 4738 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` 4739 :rtype: :class:`~oci.response.Response` 4740 4741 :example: 4742 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_public_ip_pool.py.html>`__ to see an example of how to use create_public_ip_pool API. 4743 """ 4744 resource_path = "/publicIpPools" 4745 method = "POST" 4746 4747 # Don't accept unknown kwargs 4748 expected_kwargs = [ 4749 "retry_strategy", 4750 "opc_request_id", 4751 "opc_retry_token" 4752 ] 4753 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4754 if extra_kwargs: 4755 raise ValueError( 4756 "create_public_ip_pool got unknown kwargs: {!r}".format(extra_kwargs)) 4757 4758 header_params = { 4759 "accept": "application/json", 4760 "content-type": "application/json", 4761 "opc-request-id": kwargs.get("opc_request_id", missing), 4762 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4763 } 4764 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4765 4766 retry_strategy = self.base_client.get_preferred_retry_strategy( 4767 operation_retry_strategy=kwargs.get('retry_strategy'), 4768 client_retry_strategy=self.retry_strategy 4769 ) 4770 4771 if retry_strategy: 4772 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4773 self.base_client.add_opc_retry_token_if_needed(header_params) 4774 self.base_client.add_opc_client_retries_header(header_params) 4775 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4776 return retry_strategy.make_retrying_call( 4777 self.base_client.call_api, 4778 resource_path=resource_path, 4779 method=method, 4780 header_params=header_params, 4781 body=create_public_ip_pool_details, 4782 response_type="PublicIpPool") 4783 else: 4784 return self.base_client.call_api( 4785 resource_path=resource_path, 4786 method=method, 4787 header_params=header_params, 4788 body=create_public_ip_pool_details, 4789 response_type="PublicIpPool") 4790 4791 def create_remote_peering_connection(self, create_remote_peering_connection_details, **kwargs): 4792 """ 4793 Creates a new remote peering connection (RPC) for the specified DRG. 4794 4795 4796 :param oci.core.models.CreateRemotePeeringConnectionDetails create_remote_peering_connection_details: (required) 4797 Request to create peering connection to remote region 4798 4799 :param str opc_retry_token: (optional) 4800 A token that uniquely identifies a request so it can be retried in case of a timeout or 4801 server error without risk of executing that same action again. Retry tokens expire after 24 4802 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4803 has been deleted and purged from the system, then a retry of the original creation request 4804 may be rejected). 4805 4806 :param obj retry_strategy: (optional) 4807 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4808 4809 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. 4810 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4811 4812 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4813 4814 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.RemotePeeringConnection` 4815 :rtype: :class:`~oci.response.Response` 4816 4817 :example: 4818 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_remote_peering_connection.py.html>`__ to see an example of how to use create_remote_peering_connection API. 4819 """ 4820 resource_path = "/remotePeeringConnections" 4821 method = "POST" 4822 4823 # Don't accept unknown kwargs 4824 expected_kwargs = [ 4825 "retry_strategy", 4826 "opc_retry_token" 4827 ] 4828 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4829 if extra_kwargs: 4830 raise ValueError( 4831 "create_remote_peering_connection got unknown kwargs: {!r}".format(extra_kwargs)) 4832 4833 header_params = { 4834 "accept": "application/json", 4835 "content-type": "application/json", 4836 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4837 } 4838 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4839 4840 retry_strategy = self.base_client.get_preferred_retry_strategy( 4841 operation_retry_strategy=kwargs.get('retry_strategy'), 4842 client_retry_strategy=self.retry_strategy 4843 ) 4844 4845 if retry_strategy: 4846 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4847 self.base_client.add_opc_retry_token_if_needed(header_params) 4848 self.base_client.add_opc_client_retries_header(header_params) 4849 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4850 return retry_strategy.make_retrying_call( 4851 self.base_client.call_api, 4852 resource_path=resource_path, 4853 method=method, 4854 header_params=header_params, 4855 body=create_remote_peering_connection_details, 4856 response_type="RemotePeeringConnection") 4857 else: 4858 return self.base_client.call_api( 4859 resource_path=resource_path, 4860 method=method, 4861 header_params=header_params, 4862 body=create_remote_peering_connection_details, 4863 response_type="RemotePeeringConnection") 4864 4865 def create_route_table(self, create_route_table_details, **kwargs): 4866 """ 4867 Creates a new route table for the specified VCN. In the request you must also include at least one route 4868 rule for the new route table. For information on the number of rules you can have in a route table, see 4869 `Service Limits`__. For general information about route 4870 tables in your VCN and the types of targets you can use in route rules, 4871 see `Route Tables`__. 4872 4873 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want the route 4874 table to reside. Notice that the route table doesn't have to be in the same compartment as the VCN, subnets, 4875 or other Networking Service components. If you're not sure which compartment to use, put the route 4876 table in the same compartment as the VCN. For more information about compartments and access control, see 4877 `Overview of the IAM Service`__. For information about OCIDs, see 4878 `Resource Identifiers`__. 4879 4880 You may optionally specify a *display name* for the route table, otherwise a default is provided. 4881 It does not have to be unique, and you can change it. Avoid entering confidential information. 4882 4883 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm 4884 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm 4885 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 4886 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 4887 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 4888 4889 4890 :param oci.core.models.CreateRouteTableDetails create_route_table_details: (required) 4891 Details for creating a new route table. 4892 4893 :param str opc_retry_token: (optional) 4894 A token that uniquely identifies a request so it can be retried in case of a timeout or 4895 server error without risk of executing that same action again. Retry tokens expire after 24 4896 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4897 has been deleted and purged from the system, then a retry of the original creation request 4898 may be rejected). 4899 4900 :param obj retry_strategy: (optional) 4901 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4902 4903 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. 4904 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4905 4906 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4907 4908 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.RouteTable` 4909 :rtype: :class:`~oci.response.Response` 4910 4911 :example: 4912 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_route_table.py.html>`__ to see an example of how to use create_route_table API. 4913 """ 4914 resource_path = "/routeTables" 4915 method = "POST" 4916 4917 # Don't accept unknown kwargs 4918 expected_kwargs = [ 4919 "retry_strategy", 4920 "opc_retry_token" 4921 ] 4922 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4923 if extra_kwargs: 4924 raise ValueError( 4925 "create_route_table got unknown kwargs: {!r}".format(extra_kwargs)) 4926 4927 header_params = { 4928 "accept": "application/json", 4929 "content-type": "application/json", 4930 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4931 } 4932 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4933 4934 retry_strategy = self.base_client.get_preferred_retry_strategy( 4935 operation_retry_strategy=kwargs.get('retry_strategy'), 4936 client_retry_strategy=self.retry_strategy 4937 ) 4938 4939 if retry_strategy: 4940 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4941 self.base_client.add_opc_retry_token_if_needed(header_params) 4942 self.base_client.add_opc_client_retries_header(header_params) 4943 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4944 return retry_strategy.make_retrying_call( 4945 self.base_client.call_api, 4946 resource_path=resource_path, 4947 method=method, 4948 header_params=header_params, 4949 body=create_route_table_details, 4950 response_type="RouteTable") 4951 else: 4952 return self.base_client.call_api( 4953 resource_path=resource_path, 4954 method=method, 4955 header_params=header_params, 4956 body=create_route_table_details, 4957 response_type="RouteTable") 4958 4959 def create_security_list(self, create_security_list_details, **kwargs): 4960 """ 4961 Creates a new security list for the specified VCN. For more information 4962 about security lists, see `Security Lists`__. 4963 For information on the number of rules you can have in a security list, see 4964 `Service Limits`__. 4965 4966 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want the security 4967 list to reside. Notice that the security list doesn't have to be in the same compartment as the VCN, subnets, 4968 or other Networking Service components. If you're not sure which compartment to use, put the security 4969 list in the same compartment as the VCN. For more information about compartments and access control, see 4970 `Overview of the IAM Service`__. For information about OCIDs, see 4971 `Resource Identifiers`__. 4972 4973 You may optionally specify a *display name* for the security list, otherwise a default is provided. 4974 It does not have to be unique, and you can change it. Avoid entering confidential information. 4975 4976 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securitylists.htm 4977 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm 4978 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 4979 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 4980 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 4981 4982 4983 :param oci.core.models.CreateSecurityListDetails create_security_list_details: (required) 4984 Details regarding the security list to create. 4985 4986 :param str opc_retry_token: (optional) 4987 A token that uniquely identifies a request so it can be retried in case of a timeout or 4988 server error without risk of executing that same action again. Retry tokens expire after 24 4989 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 4990 has been deleted and purged from the system, then a retry of the original creation request 4991 may be rejected). 4992 4993 :param obj retry_strategy: (optional) 4994 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4995 4996 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. 4997 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4998 4999 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5000 5001 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.SecurityList` 5002 :rtype: :class:`~oci.response.Response` 5003 5004 :example: 5005 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_security_list.py.html>`__ to see an example of how to use create_security_list API. 5006 """ 5007 resource_path = "/securityLists" 5008 method = "POST" 5009 5010 # Don't accept unknown kwargs 5011 expected_kwargs = [ 5012 "retry_strategy", 5013 "opc_retry_token" 5014 ] 5015 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5016 if extra_kwargs: 5017 raise ValueError( 5018 "create_security_list got unknown kwargs: {!r}".format(extra_kwargs)) 5019 5020 header_params = { 5021 "accept": "application/json", 5022 "content-type": "application/json", 5023 "opc-retry-token": kwargs.get("opc_retry_token", missing) 5024 } 5025 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5026 5027 retry_strategy = self.base_client.get_preferred_retry_strategy( 5028 operation_retry_strategy=kwargs.get('retry_strategy'), 5029 client_retry_strategy=self.retry_strategy 5030 ) 5031 5032 if retry_strategy: 5033 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5034 self.base_client.add_opc_retry_token_if_needed(header_params) 5035 self.base_client.add_opc_client_retries_header(header_params) 5036 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5037 return retry_strategy.make_retrying_call( 5038 self.base_client.call_api, 5039 resource_path=resource_path, 5040 method=method, 5041 header_params=header_params, 5042 body=create_security_list_details, 5043 response_type="SecurityList") 5044 else: 5045 return self.base_client.call_api( 5046 resource_path=resource_path, 5047 method=method, 5048 header_params=header_params, 5049 body=create_security_list_details, 5050 response_type="SecurityList") 5051 5052 def create_service_gateway(self, create_service_gateway_details, **kwargs): 5053 """ 5054 Creates a new service gateway in the specified compartment. 5055 5056 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want 5057 the service gateway to reside. For more information about compartments and access control, see 5058 `Overview of the IAM Service`__. 5059 For information about OCIDs, see `Resource Identifiers`__. 5060 5061 You may optionally specify a *display name* for the service gateway, otherwise a default is provided. 5062 It does not have to be unique, and you can change it. Avoid entering confidential information. 5063 5064 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5065 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 5066 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5067 5068 5069 :param oci.core.models.CreateServiceGatewayDetails create_service_gateway_details: (required) 5070 Details for creating a service gateway. 5071 5072 :param str opc_retry_token: (optional) 5073 A token that uniquely identifies a request so it can be retried in case of a timeout or 5074 server error without risk of executing that same action again. Retry tokens expire after 24 5075 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 5076 has been deleted and purged from the system, then a retry of the original creation request 5077 may be rejected). 5078 5079 :param obj retry_strategy: (optional) 5080 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5081 5082 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. 5083 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5084 5085 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5086 5087 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ServiceGateway` 5088 :rtype: :class:`~oci.response.Response` 5089 5090 :example: 5091 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_service_gateway.py.html>`__ to see an example of how to use create_service_gateway API. 5092 """ 5093 resource_path = "/serviceGateways" 5094 method = "POST" 5095 5096 # Don't accept unknown kwargs 5097 expected_kwargs = [ 5098 "retry_strategy", 5099 "opc_retry_token" 5100 ] 5101 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5102 if extra_kwargs: 5103 raise ValueError( 5104 "create_service_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 5105 5106 header_params = { 5107 "accept": "application/json", 5108 "content-type": "application/json", 5109 "opc-retry-token": kwargs.get("opc_retry_token", missing) 5110 } 5111 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5112 5113 retry_strategy = self.base_client.get_preferred_retry_strategy( 5114 operation_retry_strategy=kwargs.get('retry_strategy'), 5115 client_retry_strategy=self.retry_strategy 5116 ) 5117 5118 if retry_strategy: 5119 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5120 self.base_client.add_opc_retry_token_if_needed(header_params) 5121 self.base_client.add_opc_client_retries_header(header_params) 5122 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5123 return retry_strategy.make_retrying_call( 5124 self.base_client.call_api, 5125 resource_path=resource_path, 5126 method=method, 5127 header_params=header_params, 5128 body=create_service_gateway_details, 5129 response_type="ServiceGateway") 5130 else: 5131 return self.base_client.call_api( 5132 resource_path=resource_path, 5133 method=method, 5134 header_params=header_params, 5135 body=create_service_gateway_details, 5136 response_type="ServiceGateway") 5137 5138 def create_subnet(self, create_subnet_details, **kwargs): 5139 """ 5140 Creates a new subnet in the specified VCN. You can't change the size of the subnet after creation, 5141 so it's important to think about the size of subnets you need before creating them. 5142 For more information, see `VCNs and Subnets`__. 5143 For information on the number of subnets you can have in a VCN, see 5144 `Service Limits`__. 5145 5146 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want the subnet 5147 to reside. Notice that the subnet doesn't have to be in the same compartment as the VCN, route tables, or 5148 other Networking Service components. If you're not sure which compartment to use, put the subnet in 5149 the same compartment as the VCN. For more information about compartments and access control, see 5150 `Overview of the IAM Service`__. For information about OCIDs, 5151 see `Resource Identifiers`__. 5152 5153 You may optionally associate a route table with the subnet. If you don't, the subnet will use the 5154 VCN's default route table. For more information about route tables, see 5155 `Route Tables`__. 5156 5157 You may optionally associate a security list with the subnet. If you don't, the subnet will use the 5158 VCN's default security list. For more information about security lists, see 5159 `Security Lists`__. 5160 5161 You may optionally associate a set of DHCP options with the subnet. If you don't, the subnet will use the 5162 VCN's default set. For more information about DHCP options, see 5163 `DHCP Options`__. 5164 5165 You may optionally specify a *display name* for the subnet, otherwise a default is provided. 5166 It does not have to be unique, and you can change it. Avoid entering confidential information. 5167 5168 You can also add a DNS label for the subnet, which is required if you want the Internet and 5169 VCN Resolver to resolve hostnames for instances in the subnet. For more information, see 5170 `DNS in Your Virtual Cloud Network`__. 5171 5172 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVCNs.htm 5173 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm 5174 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5175 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 5176 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5177 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm 5178 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securitylists.htm 5179 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingDHCP.htm 5180 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm 5181 5182 5183 :param oci.core.models.CreateSubnetDetails create_subnet_details: (required) 5184 Details for creating a subnet. 5185 5186 :param str opc_retry_token: (optional) 5187 A token that uniquely identifies a request so it can be retried in case of a timeout or 5188 server error without risk of executing that same action again. Retry tokens expire after 24 5189 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 5190 has been deleted and purged from the system, then a retry of the original creation request 5191 may be rejected). 5192 5193 :param obj retry_strategy: (optional) 5194 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5195 5196 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. 5197 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5198 5199 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5200 5201 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Subnet` 5202 :rtype: :class:`~oci.response.Response` 5203 5204 :example: 5205 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_subnet.py.html>`__ to see an example of how to use create_subnet API. 5206 """ 5207 resource_path = "/subnets" 5208 method = "POST" 5209 5210 # Don't accept unknown kwargs 5211 expected_kwargs = [ 5212 "retry_strategy", 5213 "opc_retry_token" 5214 ] 5215 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5216 if extra_kwargs: 5217 raise ValueError( 5218 "create_subnet got unknown kwargs: {!r}".format(extra_kwargs)) 5219 5220 header_params = { 5221 "accept": "application/json", 5222 "content-type": "application/json", 5223 "opc-retry-token": kwargs.get("opc_retry_token", missing) 5224 } 5225 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5226 5227 retry_strategy = self.base_client.get_preferred_retry_strategy( 5228 operation_retry_strategy=kwargs.get('retry_strategy'), 5229 client_retry_strategy=self.retry_strategy 5230 ) 5231 5232 if retry_strategy: 5233 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5234 self.base_client.add_opc_retry_token_if_needed(header_params) 5235 self.base_client.add_opc_client_retries_header(header_params) 5236 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5237 return retry_strategy.make_retrying_call( 5238 self.base_client.call_api, 5239 resource_path=resource_path, 5240 method=method, 5241 header_params=header_params, 5242 body=create_subnet_details, 5243 response_type="Subnet") 5244 else: 5245 return self.base_client.call_api( 5246 resource_path=resource_path, 5247 method=method, 5248 header_params=header_params, 5249 body=create_subnet_details, 5250 response_type="Subnet") 5251 5252 def create_vcn(self, create_vcn_details, **kwargs): 5253 """ 5254 Creates a new virtual cloud network (VCN). For more information, see 5255 `VCNs and Subnets`__. 5256 5257 For the VCN, you specify a list of one or more IPv4 CIDR blocks that meet the following criteria: 5258 5259 - The CIDR blocks must be valid. 5260 - They must not overlap with each other or with the on-premises network CIDR block. 5261 - The number of CIDR blocks does not exceed the limit of CIDR blocks allowed per VCN. 5262 5263 For a CIDR block, Oracle recommends that you use one of the private IP address ranges specified in `RFC 1918`__ (10.0.0.0/8, 172.16/12, and 192.168/16). Example: 5264 172.16.0.0/16. The CIDR blocks can range from /16 to /30. 5265 5266 For the purposes of access control, you must provide the `OCID`__ of the compartment where you want the VCN to 5267 reside. Consult an Oracle Cloud Infrastructure administrator in your organization if you're not sure which 5268 compartment to use. Notice that the VCN doesn't have to be in the same compartment as the subnets or other 5269 Networking Service components. For more information about compartments and access control, see 5270 `Overview of the IAM Service`__. For information about OCIDs, see 5271 `Resource Identifiers`__. 5272 5273 You may optionally specify a *display name* for the VCN, otherwise a default is provided. It does not have to 5274 be unique, and you can change it. Avoid entering confidential information. 5275 5276 You can also add a DNS label for the VCN, which is required if you want the instances to use the 5277 Interent and VCN Resolver option for DNS in the VCN. For more information, see 5278 `DNS in Your Virtual Cloud Network`__. 5279 5280 The VCN automatically comes with a default route table, default security list, and default set of DHCP options. 5281 The `OCID`__ for each is returned in the response. You can't delete these default objects, but you can change their 5282 contents (that is, change the route rules, security list rules, and so on). 5283 5284 The VCN and subnets you create are not accessible until you attach an internet gateway or set up a Site-to-Site VPN 5285 or FastConnect. For more information, see 5286 `Overview of the Networking Service`__. 5287 5288 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVCNs.htm 5289 __ https://tools.ietf.org/html/rfc1918 5290 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5291 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 5292 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5293 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm 5294 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5295 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm 5296 5297 5298 :param oci.core.models.CreateVcnDetails create_vcn_details: (required) 5299 Details for creating a new VCN. 5300 5301 :param str opc_retry_token: (optional) 5302 A token that uniquely identifies a request so it can be retried in case of a timeout or 5303 server error without risk of executing that same action again. Retry tokens expire after 24 5304 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 5305 has been deleted and purged from the system, then a retry of the original creation request 5306 may be rejected). 5307 5308 :param obj retry_strategy: (optional) 5309 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5310 5311 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. 5312 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5313 5314 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5315 5316 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vcn` 5317 :rtype: :class:`~oci.response.Response` 5318 5319 :example: 5320 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_vcn.py.html>`__ to see an example of how to use create_vcn API. 5321 """ 5322 resource_path = "/vcns" 5323 method = "POST" 5324 5325 # Don't accept unknown kwargs 5326 expected_kwargs = [ 5327 "retry_strategy", 5328 "opc_retry_token" 5329 ] 5330 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5331 if extra_kwargs: 5332 raise ValueError( 5333 "create_vcn got unknown kwargs: {!r}".format(extra_kwargs)) 5334 5335 header_params = { 5336 "accept": "application/json", 5337 "content-type": "application/json", 5338 "opc-retry-token": kwargs.get("opc_retry_token", missing) 5339 } 5340 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5341 5342 retry_strategy = self.base_client.get_preferred_retry_strategy( 5343 operation_retry_strategy=kwargs.get('retry_strategy'), 5344 client_retry_strategy=self.retry_strategy 5345 ) 5346 5347 if retry_strategy: 5348 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5349 self.base_client.add_opc_retry_token_if_needed(header_params) 5350 self.base_client.add_opc_client_retries_header(header_params) 5351 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5352 return retry_strategy.make_retrying_call( 5353 self.base_client.call_api, 5354 resource_path=resource_path, 5355 method=method, 5356 header_params=header_params, 5357 body=create_vcn_details, 5358 response_type="Vcn") 5359 else: 5360 return self.base_client.call_api( 5361 resource_path=resource_path, 5362 method=method, 5363 header_params=header_params, 5364 body=create_vcn_details, 5365 response_type="Vcn") 5366 5367 def create_virtual_circuit(self, create_virtual_circuit_details, **kwargs): 5368 """ 5369 Creates a new virtual circuit to use with Oracle Cloud 5370 Infrastructure FastConnect. For more information, see 5371 `FastConnect Overview`__. 5372 5373 For the purposes of access control, you must provide the `OCID`__ of the 5374 compartment where you want the virtual circuit to reside. If you're 5375 not sure which compartment to use, put the virtual circuit in the 5376 same compartment with the DRG it's using. For more information about 5377 compartments and access control, see 5378 `Overview of the IAM Service`__. 5379 For information about OCIDs, see 5380 `Resource Identifiers`__. 5381 5382 You may optionally specify a *display name* for the virtual circuit. 5383 It does not have to be unique, and you can change it. Avoid entering confidential information. 5384 5385 **Important:** When creating a virtual circuit, you specify a DRG for 5386 the traffic to flow through. Make sure you attach the DRG to your 5387 VCN and confirm the VCN's routing sends traffic to the DRG. Otherwise 5388 traffic will not flow. For more information, see 5389 `Route Tables`__. 5390 5391 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm 5392 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5393 __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm 5394 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5395 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm 5396 5397 5398 :param oci.core.models.CreateVirtualCircuitDetails create_virtual_circuit_details: (required) 5399 Details to create a VirtualCircuit. 5400 5401 :param str opc_retry_token: (optional) 5402 A token that uniquely identifies a request so it can be retried in case of a timeout or 5403 server error without risk of executing that same action again. Retry tokens expire after 24 5404 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 5405 has been deleted and purged from the system, then a retry of the original creation request 5406 may be rejected). 5407 5408 :param obj retry_strategy: (optional) 5409 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5410 5411 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. 5412 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5413 5414 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5415 5416 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VirtualCircuit` 5417 :rtype: :class:`~oci.response.Response` 5418 5419 :example: 5420 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_virtual_circuit.py.html>`__ to see an example of how to use create_virtual_circuit API. 5421 """ 5422 resource_path = "/virtualCircuits" 5423 method = "POST" 5424 5425 # Don't accept unknown kwargs 5426 expected_kwargs = [ 5427 "retry_strategy", 5428 "opc_retry_token" 5429 ] 5430 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5431 if extra_kwargs: 5432 raise ValueError( 5433 "create_virtual_circuit got unknown kwargs: {!r}".format(extra_kwargs)) 5434 5435 header_params = { 5436 "accept": "application/json", 5437 "content-type": "application/json", 5438 "opc-retry-token": kwargs.get("opc_retry_token", missing) 5439 } 5440 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5441 5442 retry_strategy = self.base_client.get_preferred_retry_strategy( 5443 operation_retry_strategy=kwargs.get('retry_strategy'), 5444 client_retry_strategy=self.retry_strategy 5445 ) 5446 5447 if retry_strategy: 5448 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5449 self.base_client.add_opc_retry_token_if_needed(header_params) 5450 self.base_client.add_opc_client_retries_header(header_params) 5451 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5452 return retry_strategy.make_retrying_call( 5453 self.base_client.call_api, 5454 resource_path=resource_path, 5455 method=method, 5456 header_params=header_params, 5457 body=create_virtual_circuit_details, 5458 response_type="VirtualCircuit") 5459 else: 5460 return self.base_client.call_api( 5461 resource_path=resource_path, 5462 method=method, 5463 header_params=header_params, 5464 body=create_virtual_circuit_details, 5465 response_type="VirtualCircuit") 5466 5467 def create_vlan(self, create_vlan_details, **kwargs): 5468 """ 5469 Creates a VLAN in the specified VCN and the specified compartment. 5470 5471 5472 :param oci.core.models.CreateVlanDetails create_vlan_details: (required) 5473 Details for creating a VLAN 5474 5475 :param str opc_retry_token: (optional) 5476 A token that uniquely identifies a request so it can be retried in case of a timeout or 5477 server error without risk of executing that same action again. Retry tokens expire after 24 5478 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 5479 has been deleted and purged from the system, then a retry of the original creation request 5480 may be rejected). 5481 5482 :param str opc_request_id: (optional) 5483 Unique identifier for the request. 5484 If you need to contact Oracle about a particular request, please provide the request ID. 5485 5486 :param obj retry_strategy: (optional) 5487 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5488 5489 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. 5490 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5491 5492 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5493 5494 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vlan` 5495 :rtype: :class:`~oci.response.Response` 5496 5497 :example: 5498 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_vlan.py.html>`__ to see an example of how to use create_vlan API. 5499 """ 5500 resource_path = "/vlans" 5501 method = "POST" 5502 5503 # Don't accept unknown kwargs 5504 expected_kwargs = [ 5505 "retry_strategy", 5506 "opc_retry_token", 5507 "opc_request_id" 5508 ] 5509 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5510 if extra_kwargs: 5511 raise ValueError( 5512 "create_vlan got unknown kwargs: {!r}".format(extra_kwargs)) 5513 5514 header_params = { 5515 "accept": "application/json", 5516 "content-type": "application/json", 5517 "opc-retry-token": kwargs.get("opc_retry_token", missing), 5518 "opc-request-id": kwargs.get("opc_request_id", missing) 5519 } 5520 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5521 5522 retry_strategy = self.base_client.get_preferred_retry_strategy( 5523 operation_retry_strategy=kwargs.get('retry_strategy'), 5524 client_retry_strategy=self.retry_strategy 5525 ) 5526 5527 if retry_strategy: 5528 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5529 self.base_client.add_opc_retry_token_if_needed(header_params) 5530 self.base_client.add_opc_client_retries_header(header_params) 5531 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5532 return retry_strategy.make_retrying_call( 5533 self.base_client.call_api, 5534 resource_path=resource_path, 5535 method=method, 5536 header_params=header_params, 5537 body=create_vlan_details, 5538 response_type="Vlan") 5539 else: 5540 return self.base_client.call_api( 5541 resource_path=resource_path, 5542 method=method, 5543 header_params=header_params, 5544 body=create_vlan_details, 5545 response_type="Vlan") 5546 5547 def delete_byoip_range(self, byoip_range_id, **kwargs): 5548 """ 5549 Deletes the specified `ByoipRange` resource. 5550 The resource must be in one of the following states: CREATING, PROVISIONED, ACTIVE, or FAILED. 5551 It must not have any subranges currently allocated to a PublicIpPool object or the deletion will fail. 5552 You must specify the `OCID`__. 5553 If the `ByoipRange` resource is currently in the PROVISIONED or ACTIVE state, it will be de-provisioned and then deleted. 5554 5555 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5556 5557 5558 :param str byoip_range_id: (required) 5559 The `OCID`__ of the `ByoipRange` resource containing the BYOIP CIDR block. 5560 5561 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 5562 5563 :param str opc_request_id: (optional) 5564 Unique identifier for the request. 5565 If you need to contact Oracle about a particular request, please provide the request ID. 5566 5567 :param str if_match: (optional) 5568 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 5569 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 5570 will be updated or deleted only if the etag you provide matches the resource's current etag value. 5571 5572 :param obj retry_strategy: (optional) 5573 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5574 5575 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. 5576 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5577 5578 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5579 5580 :return: A :class:`~oci.response.Response` object with data of type None 5581 :rtype: :class:`~oci.response.Response` 5582 5583 :example: 5584 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_byoip_range.py.html>`__ to see an example of how to use delete_byoip_range API. 5585 """ 5586 resource_path = "/byoipRanges/{byoipRangeId}" 5587 method = "DELETE" 5588 5589 # Don't accept unknown kwargs 5590 expected_kwargs = [ 5591 "retry_strategy", 5592 "opc_request_id", 5593 "if_match" 5594 ] 5595 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5596 if extra_kwargs: 5597 raise ValueError( 5598 "delete_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) 5599 5600 path_params = { 5601 "byoipRangeId": byoip_range_id 5602 } 5603 5604 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5605 5606 for (k, v) in six.iteritems(path_params): 5607 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5608 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5609 5610 header_params = { 5611 "accept": "application/json", 5612 "content-type": "application/json", 5613 "opc-request-id": kwargs.get("opc_request_id", missing), 5614 "if-match": kwargs.get("if_match", missing) 5615 } 5616 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5617 5618 retry_strategy = self.base_client.get_preferred_retry_strategy( 5619 operation_retry_strategy=kwargs.get('retry_strategy'), 5620 client_retry_strategy=self.retry_strategy 5621 ) 5622 5623 if retry_strategy: 5624 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5625 self.base_client.add_opc_client_retries_header(header_params) 5626 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5627 return retry_strategy.make_retrying_call( 5628 self.base_client.call_api, 5629 resource_path=resource_path, 5630 method=method, 5631 path_params=path_params, 5632 header_params=header_params) 5633 else: 5634 return self.base_client.call_api( 5635 resource_path=resource_path, 5636 method=method, 5637 path_params=path_params, 5638 header_params=header_params) 5639 5640 def delete_cpe(self, cpe_id, **kwargs): 5641 """ 5642 Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous 5643 operation. The CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely 5644 removed. 5645 5646 5647 :param str cpe_id: (required) 5648 The `OCID`__ of the CPE. 5649 5650 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 5651 5652 :param str if_match: (optional) 5653 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 5654 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 5655 will be updated or deleted only if the etag you provide matches the resource's current etag value. 5656 5657 :param obj retry_strategy: (optional) 5658 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5659 5660 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. 5661 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5662 5663 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5664 5665 :return: A :class:`~oci.response.Response` object with data of type None 5666 :rtype: :class:`~oci.response.Response` 5667 5668 :example: 5669 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_cpe.py.html>`__ to see an example of how to use delete_cpe API. 5670 """ 5671 resource_path = "/cpes/{cpeId}" 5672 method = "DELETE" 5673 5674 # Don't accept unknown kwargs 5675 expected_kwargs = [ 5676 "retry_strategy", 5677 "if_match" 5678 ] 5679 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5680 if extra_kwargs: 5681 raise ValueError( 5682 "delete_cpe got unknown kwargs: {!r}".format(extra_kwargs)) 5683 5684 path_params = { 5685 "cpeId": cpe_id 5686 } 5687 5688 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5689 5690 for (k, v) in six.iteritems(path_params): 5691 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5692 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5693 5694 header_params = { 5695 "accept": "application/json", 5696 "content-type": "application/json", 5697 "if-match": kwargs.get("if_match", missing) 5698 } 5699 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5700 5701 retry_strategy = self.base_client.get_preferred_retry_strategy( 5702 operation_retry_strategy=kwargs.get('retry_strategy'), 5703 client_retry_strategy=self.retry_strategy 5704 ) 5705 5706 if retry_strategy: 5707 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5708 self.base_client.add_opc_client_retries_header(header_params) 5709 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5710 return retry_strategy.make_retrying_call( 5711 self.base_client.call_api, 5712 resource_path=resource_path, 5713 method=method, 5714 path_params=path_params, 5715 header_params=header_params) 5716 else: 5717 return self.base_client.call_api( 5718 resource_path=resource_path, 5719 method=method, 5720 path_params=path_params, 5721 header_params=header_params) 5722 5723 def delete_cross_connect(self, cross_connect_id, **kwargs): 5724 """ 5725 Deletes the specified cross-connect. It must not be mapped to a 5726 :class:`VirtualCircuit`. 5727 5728 5729 :param str cross_connect_id: (required) 5730 The `OCID`__ of the cross-connect. 5731 5732 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 5733 5734 :param str if_match: (optional) 5735 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 5736 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 5737 will be updated or deleted only if the etag you provide matches the resource's current etag value. 5738 5739 :param obj retry_strategy: (optional) 5740 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5741 5742 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. 5743 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5744 5745 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5746 5747 :return: A :class:`~oci.response.Response` object with data of type None 5748 :rtype: :class:`~oci.response.Response` 5749 5750 :example: 5751 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_cross_connect.py.html>`__ to see an example of how to use delete_cross_connect API. 5752 """ 5753 resource_path = "/crossConnects/{crossConnectId}" 5754 method = "DELETE" 5755 5756 # Don't accept unknown kwargs 5757 expected_kwargs = [ 5758 "retry_strategy", 5759 "if_match" 5760 ] 5761 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5762 if extra_kwargs: 5763 raise ValueError( 5764 "delete_cross_connect got unknown kwargs: {!r}".format(extra_kwargs)) 5765 5766 path_params = { 5767 "crossConnectId": cross_connect_id 5768 } 5769 5770 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5771 5772 for (k, v) in six.iteritems(path_params): 5773 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5774 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5775 5776 header_params = { 5777 "accept": "application/json", 5778 "content-type": "application/json", 5779 "if-match": kwargs.get("if_match", missing) 5780 } 5781 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5782 5783 retry_strategy = self.base_client.get_preferred_retry_strategy( 5784 operation_retry_strategy=kwargs.get('retry_strategy'), 5785 client_retry_strategy=self.retry_strategy 5786 ) 5787 5788 if retry_strategy: 5789 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5790 self.base_client.add_opc_client_retries_header(header_params) 5791 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5792 return retry_strategy.make_retrying_call( 5793 self.base_client.call_api, 5794 resource_path=resource_path, 5795 method=method, 5796 path_params=path_params, 5797 header_params=header_params) 5798 else: 5799 return self.base_client.call_api( 5800 resource_path=resource_path, 5801 method=method, 5802 path_params=path_params, 5803 header_params=header_params) 5804 5805 def delete_cross_connect_group(self, cross_connect_group_id, **kwargs): 5806 """ 5807 Deletes the specified cross-connect group. It must not contain any 5808 cross-connects, and it cannot be mapped to a 5809 :class:`VirtualCircuit`. 5810 5811 5812 :param str cross_connect_group_id: (required) 5813 The `OCID`__ of the cross-connect group. 5814 5815 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 5816 5817 :param str if_match: (optional) 5818 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 5819 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 5820 will be updated or deleted only if the etag you provide matches the resource's current etag value. 5821 5822 :param obj retry_strategy: (optional) 5823 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5824 5825 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. 5826 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5827 5828 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5829 5830 :return: A :class:`~oci.response.Response` object with data of type None 5831 :rtype: :class:`~oci.response.Response` 5832 5833 :example: 5834 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_cross_connect_group.py.html>`__ to see an example of how to use delete_cross_connect_group API. 5835 """ 5836 resource_path = "/crossConnectGroups/{crossConnectGroupId}" 5837 method = "DELETE" 5838 5839 # Don't accept unknown kwargs 5840 expected_kwargs = [ 5841 "retry_strategy", 5842 "if_match" 5843 ] 5844 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5845 if extra_kwargs: 5846 raise ValueError( 5847 "delete_cross_connect_group got unknown kwargs: {!r}".format(extra_kwargs)) 5848 5849 path_params = { 5850 "crossConnectGroupId": cross_connect_group_id 5851 } 5852 5853 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5854 5855 for (k, v) in six.iteritems(path_params): 5856 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5857 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5858 5859 header_params = { 5860 "accept": "application/json", 5861 "content-type": "application/json", 5862 "if-match": kwargs.get("if_match", missing) 5863 } 5864 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5865 5866 retry_strategy = self.base_client.get_preferred_retry_strategy( 5867 operation_retry_strategy=kwargs.get('retry_strategy'), 5868 client_retry_strategy=self.retry_strategy 5869 ) 5870 5871 if retry_strategy: 5872 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5873 self.base_client.add_opc_client_retries_header(header_params) 5874 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5875 return retry_strategy.make_retrying_call( 5876 self.base_client.call_api, 5877 resource_path=resource_path, 5878 method=method, 5879 path_params=path_params, 5880 header_params=header_params) 5881 else: 5882 return self.base_client.call_api( 5883 resource_path=resource_path, 5884 method=method, 5885 path_params=path_params, 5886 header_params=header_params) 5887 5888 def delete_dhcp_options(self, dhcp_id, **kwargs): 5889 """ 5890 Deletes the specified set of DHCP options, but only if it's not associated with a subnet. You can't delete a 5891 VCN's default set of DHCP options. 5892 5893 This is an asynchronous operation. The state of the set of options will switch to TERMINATING temporarily 5894 until the set is completely removed. 5895 5896 5897 :param str dhcp_id: (required) 5898 The `OCID`__ for the set of DHCP options. 5899 5900 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 5901 5902 :param str if_match: (optional) 5903 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 5904 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 5905 will be updated or deleted only if the etag you provide matches the resource's current etag value. 5906 5907 :param obj retry_strategy: (optional) 5908 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5909 5910 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. 5911 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5912 5913 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5914 5915 :return: A :class:`~oci.response.Response` object with data of type None 5916 :rtype: :class:`~oci.response.Response` 5917 5918 :example: 5919 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_dhcp_options.py.html>`__ to see an example of how to use delete_dhcp_options API. 5920 """ 5921 resource_path = "/dhcps/{dhcpId}" 5922 method = "DELETE" 5923 5924 # Don't accept unknown kwargs 5925 expected_kwargs = [ 5926 "retry_strategy", 5927 "if_match" 5928 ] 5929 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5930 if extra_kwargs: 5931 raise ValueError( 5932 "delete_dhcp_options got unknown kwargs: {!r}".format(extra_kwargs)) 5933 5934 path_params = { 5935 "dhcpId": dhcp_id 5936 } 5937 5938 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5939 5940 for (k, v) in six.iteritems(path_params): 5941 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5942 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5943 5944 header_params = { 5945 "accept": "application/json", 5946 "content-type": "application/json", 5947 "if-match": kwargs.get("if_match", missing) 5948 } 5949 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5950 5951 retry_strategy = self.base_client.get_preferred_retry_strategy( 5952 operation_retry_strategy=kwargs.get('retry_strategy'), 5953 client_retry_strategy=self.retry_strategy 5954 ) 5955 5956 if retry_strategy: 5957 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5958 self.base_client.add_opc_client_retries_header(header_params) 5959 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5960 return retry_strategy.make_retrying_call( 5961 self.base_client.call_api, 5962 resource_path=resource_path, 5963 method=method, 5964 path_params=path_params, 5965 header_params=header_params) 5966 else: 5967 return self.base_client.call_api( 5968 resource_path=resource_path, 5969 method=method, 5970 path_params=path_params, 5971 header_params=header_params) 5972 5973 def delete_drg(self, drg_id, **kwargs): 5974 """ 5975 Deletes the specified DRG. The DRG must not be attached to a VCN or be connected to your on-premise 5976 network. Also, there must not be a route table that lists the DRG as a target. This is an asynchronous 5977 operation. The DRG's `lifecycleState` will change to TERMINATING temporarily until the DRG is completely 5978 removed. 5979 5980 5981 :param str drg_id: (required) 5982 The `OCID`__ of the DRG. 5983 5984 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 5985 5986 :param str if_match: (optional) 5987 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 5988 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 5989 will be updated or deleted only if the etag you provide matches the resource's current etag value. 5990 5991 :param obj retry_strategy: (optional) 5992 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5993 5994 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. 5995 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5996 5997 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5998 5999 :return: A :class:`~oci.response.Response` object with data of type None 6000 :rtype: :class:`~oci.response.Response` 6001 6002 :example: 6003 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_drg.py.html>`__ to see an example of how to use delete_drg API. 6004 """ 6005 resource_path = "/drgs/{drgId}" 6006 method = "DELETE" 6007 6008 # Don't accept unknown kwargs 6009 expected_kwargs = [ 6010 "retry_strategy", 6011 "if_match" 6012 ] 6013 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6014 if extra_kwargs: 6015 raise ValueError( 6016 "delete_drg got unknown kwargs: {!r}".format(extra_kwargs)) 6017 6018 path_params = { 6019 "drgId": drg_id 6020 } 6021 6022 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6023 6024 for (k, v) in six.iteritems(path_params): 6025 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6026 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6027 6028 header_params = { 6029 "accept": "application/json", 6030 "content-type": "application/json", 6031 "if-match": kwargs.get("if_match", missing) 6032 } 6033 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6034 6035 retry_strategy = self.base_client.get_preferred_retry_strategy( 6036 operation_retry_strategy=kwargs.get('retry_strategy'), 6037 client_retry_strategy=self.retry_strategy 6038 ) 6039 6040 if retry_strategy: 6041 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6042 self.base_client.add_opc_client_retries_header(header_params) 6043 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6044 return retry_strategy.make_retrying_call( 6045 self.base_client.call_api, 6046 resource_path=resource_path, 6047 method=method, 6048 path_params=path_params, 6049 header_params=header_params) 6050 else: 6051 return self.base_client.call_api( 6052 resource_path=resource_path, 6053 method=method, 6054 path_params=path_params, 6055 header_params=header_params) 6056 6057 def delete_drg_attachment(self, drg_attachment_id, **kwargs): 6058 """ 6059 Detaches a DRG from a network resource by deleting the corresponding `DrgAttachment` resource. This is an asynchronous 6060 operation. The attachment's `lifecycleState` will temporarily change to DETACHING until the attachment 6061 is completely removed. 6062 6063 6064 :param str drg_attachment_id: (required) 6065 The `OCID`__ of the DRG attachment. 6066 6067 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6068 6069 :param str if_match: (optional) 6070 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6071 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6072 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6073 6074 :param obj retry_strategy: (optional) 6075 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6076 6077 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. 6078 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6079 6080 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6081 6082 :return: A :class:`~oci.response.Response` object with data of type None 6083 :rtype: :class:`~oci.response.Response` 6084 6085 :example: 6086 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_drg_attachment.py.html>`__ to see an example of how to use delete_drg_attachment API. 6087 """ 6088 resource_path = "/drgAttachments/{drgAttachmentId}" 6089 method = "DELETE" 6090 6091 # Don't accept unknown kwargs 6092 expected_kwargs = [ 6093 "retry_strategy", 6094 "if_match" 6095 ] 6096 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6097 if extra_kwargs: 6098 raise ValueError( 6099 "delete_drg_attachment got unknown kwargs: {!r}".format(extra_kwargs)) 6100 6101 path_params = { 6102 "drgAttachmentId": drg_attachment_id 6103 } 6104 6105 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6106 6107 for (k, v) in six.iteritems(path_params): 6108 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6109 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6110 6111 header_params = { 6112 "accept": "application/json", 6113 "content-type": "application/json", 6114 "if-match": kwargs.get("if_match", missing) 6115 } 6116 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6117 6118 retry_strategy = self.base_client.get_preferred_retry_strategy( 6119 operation_retry_strategy=kwargs.get('retry_strategy'), 6120 client_retry_strategy=self.retry_strategy 6121 ) 6122 6123 if retry_strategy: 6124 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6125 self.base_client.add_opc_client_retries_header(header_params) 6126 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6127 return retry_strategy.make_retrying_call( 6128 self.base_client.call_api, 6129 resource_path=resource_path, 6130 method=method, 6131 path_params=path_params, 6132 header_params=header_params) 6133 else: 6134 return self.base_client.call_api( 6135 resource_path=resource_path, 6136 method=method, 6137 path_params=path_params, 6138 header_params=header_params) 6139 6140 def delete_drg_route_distribution(self, drg_route_distribution_id, **kwargs): 6141 """ 6142 Deletes the specified route distribution. You can't delete a route distribution currently in use by a DRG attachment or DRG route table. 6143 6144 Remove the DRG route distribution from a DRG attachment or DRG route table by using the \"RemoveExportDrgRouteDistribution\" or \"RemoveImportDrgRouteDistribution' operations. 6145 6146 6147 :param str drg_route_distribution_id: (required) 6148 The `OCID`__ of the route distribution. 6149 6150 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6151 6152 :param str if_match: (optional) 6153 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6154 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6155 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6156 6157 :param obj retry_strategy: (optional) 6158 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6159 6160 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. 6161 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6162 6163 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6164 6165 :return: A :class:`~oci.response.Response` object with data of type None 6166 :rtype: :class:`~oci.response.Response` 6167 6168 :example: 6169 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_drg_route_distribution.py.html>`__ to see an example of how to use delete_drg_route_distribution API. 6170 """ 6171 resource_path = "/drgRouteDistributions/{drgRouteDistributionId}" 6172 method = "DELETE" 6173 6174 # Don't accept unknown kwargs 6175 expected_kwargs = [ 6176 "retry_strategy", 6177 "if_match" 6178 ] 6179 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6180 if extra_kwargs: 6181 raise ValueError( 6182 "delete_drg_route_distribution got unknown kwargs: {!r}".format(extra_kwargs)) 6183 6184 path_params = { 6185 "drgRouteDistributionId": drg_route_distribution_id 6186 } 6187 6188 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6189 6190 for (k, v) in six.iteritems(path_params): 6191 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6192 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6193 6194 header_params = { 6195 "accept": "application/json", 6196 "content-type": "application/json", 6197 "if-match": kwargs.get("if_match", missing) 6198 } 6199 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6200 6201 retry_strategy = self.base_client.get_preferred_retry_strategy( 6202 operation_retry_strategy=kwargs.get('retry_strategy'), 6203 client_retry_strategy=self.retry_strategy 6204 ) 6205 6206 if retry_strategy: 6207 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6208 self.base_client.add_opc_client_retries_header(header_params) 6209 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6210 return retry_strategy.make_retrying_call( 6211 self.base_client.call_api, 6212 resource_path=resource_path, 6213 method=method, 6214 path_params=path_params, 6215 header_params=header_params) 6216 else: 6217 return self.base_client.call_api( 6218 resource_path=resource_path, 6219 method=method, 6220 path_params=path_params, 6221 header_params=header_params) 6222 6223 def delete_drg_route_table(self, drg_route_table_id, **kwargs): 6224 """ 6225 Deletes the specified DRG route table. There must not be any DRG attachments assigned. 6226 6227 6228 :param str drg_route_table_id: (required) 6229 The `OCID`__ of the DRG route table. 6230 6231 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6232 6233 :param str if_match: (optional) 6234 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6235 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6236 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6237 6238 :param obj retry_strategy: (optional) 6239 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6240 6241 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. 6242 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6243 6244 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6245 6246 :return: A :class:`~oci.response.Response` object with data of type None 6247 :rtype: :class:`~oci.response.Response` 6248 6249 :example: 6250 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_drg_route_table.py.html>`__ to see an example of how to use delete_drg_route_table API. 6251 """ 6252 resource_path = "/drgRouteTables/{drgRouteTableId}" 6253 method = "DELETE" 6254 6255 # Don't accept unknown kwargs 6256 expected_kwargs = [ 6257 "retry_strategy", 6258 "if_match" 6259 ] 6260 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6261 if extra_kwargs: 6262 raise ValueError( 6263 "delete_drg_route_table got unknown kwargs: {!r}".format(extra_kwargs)) 6264 6265 path_params = { 6266 "drgRouteTableId": drg_route_table_id 6267 } 6268 6269 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6270 6271 for (k, v) in six.iteritems(path_params): 6272 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6273 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6274 6275 header_params = { 6276 "accept": "application/json", 6277 "content-type": "application/json", 6278 "if-match": kwargs.get("if_match", missing) 6279 } 6280 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6281 6282 retry_strategy = self.base_client.get_preferred_retry_strategy( 6283 operation_retry_strategy=kwargs.get('retry_strategy'), 6284 client_retry_strategy=self.retry_strategy 6285 ) 6286 6287 if retry_strategy: 6288 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6289 self.base_client.add_opc_client_retries_header(header_params) 6290 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6291 return retry_strategy.make_retrying_call( 6292 self.base_client.call_api, 6293 resource_path=resource_path, 6294 method=method, 6295 path_params=path_params, 6296 header_params=header_params) 6297 else: 6298 return self.base_client.call_api( 6299 resource_path=resource_path, 6300 method=method, 6301 path_params=path_params, 6302 header_params=header_params) 6303 6304 def delete_internet_gateway(self, ig_id, **kwargs): 6305 """ 6306 Deletes the specified internet gateway. The internet gateway does not have to be disabled, but 6307 there must not be a route table that lists it as a target. 6308 6309 This is an asynchronous operation. The gateway's `lifecycleState` will change to TERMINATING temporarily 6310 until the gateway is completely removed. 6311 6312 6313 :param str ig_id: (required) 6314 The `OCID`__ of the internet gateway. 6315 6316 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 6317 6318 :param str if_match: (optional) 6319 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6320 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6321 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6322 6323 :param obj retry_strategy: (optional) 6324 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6325 6326 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. 6327 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6328 6329 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6330 6331 :return: A :class:`~oci.response.Response` object with data of type None 6332 :rtype: :class:`~oci.response.Response` 6333 6334 :example: 6335 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_internet_gateway.py.html>`__ to see an example of how to use delete_internet_gateway API. 6336 """ 6337 resource_path = "/internetGateways/{igId}" 6338 method = "DELETE" 6339 6340 # Don't accept unknown kwargs 6341 expected_kwargs = [ 6342 "retry_strategy", 6343 "if_match" 6344 ] 6345 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6346 if extra_kwargs: 6347 raise ValueError( 6348 "delete_internet_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 6349 6350 path_params = { 6351 "igId": ig_id 6352 } 6353 6354 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6355 6356 for (k, v) in six.iteritems(path_params): 6357 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6358 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6359 6360 header_params = { 6361 "accept": "application/json", 6362 "content-type": "application/json", 6363 "if-match": kwargs.get("if_match", missing) 6364 } 6365 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6366 6367 retry_strategy = self.base_client.get_preferred_retry_strategy( 6368 operation_retry_strategy=kwargs.get('retry_strategy'), 6369 client_retry_strategy=self.retry_strategy 6370 ) 6371 6372 if retry_strategy: 6373 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6374 self.base_client.add_opc_client_retries_header(header_params) 6375 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6376 return retry_strategy.make_retrying_call( 6377 self.base_client.call_api, 6378 resource_path=resource_path, 6379 method=method, 6380 path_params=path_params, 6381 header_params=header_params) 6382 else: 6383 return self.base_client.call_api( 6384 resource_path=resource_path, 6385 method=method, 6386 path_params=path_params, 6387 header_params=header_params) 6388 6389 def delete_ip_sec_connection(self, ipsc_id, **kwargs): 6390 """ 6391 Deletes the specified IPSec connection. If your goal is to disable the Site-to-Site VPN between your VCN and 6392 on-premises network, it's easiest to simply detach the DRG but keep all the Site-to-Site VPN components intact. 6393 If you were to delete all the components and then later need to create an Site-to-Site VPN again, you would 6394 need to configure your on-premises router again with the new information returned from 6395 :func:`create_ip_sec_connection`. 6396 6397 This is an asynchronous operation. The connection's `lifecycleState` will change to TERMINATING temporarily 6398 until the connection is completely removed. 6399 6400 6401 :param str ipsc_id: (required) 6402 The `OCID`__ of the IPSec connection. 6403 6404 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 6405 6406 :param str if_match: (optional) 6407 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6408 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6409 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6410 6411 :param obj retry_strategy: (optional) 6412 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6413 6414 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. 6415 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6416 6417 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6418 6419 :return: A :class:`~oci.response.Response` object with data of type None 6420 :rtype: :class:`~oci.response.Response` 6421 6422 :example: 6423 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_ip_sec_connection.py.html>`__ to see an example of how to use delete_ip_sec_connection API. 6424 """ 6425 resource_path = "/ipsecConnections/{ipscId}" 6426 method = "DELETE" 6427 6428 # Don't accept unknown kwargs 6429 expected_kwargs = [ 6430 "retry_strategy", 6431 "if_match" 6432 ] 6433 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6434 if extra_kwargs: 6435 raise ValueError( 6436 "delete_ip_sec_connection got unknown kwargs: {!r}".format(extra_kwargs)) 6437 6438 path_params = { 6439 "ipscId": ipsc_id 6440 } 6441 6442 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6443 6444 for (k, v) in six.iteritems(path_params): 6445 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6446 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6447 6448 header_params = { 6449 "accept": "application/json", 6450 "content-type": "application/json", 6451 "if-match": kwargs.get("if_match", missing) 6452 } 6453 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6454 6455 retry_strategy = self.base_client.get_preferred_retry_strategy( 6456 operation_retry_strategy=kwargs.get('retry_strategy'), 6457 client_retry_strategy=self.retry_strategy 6458 ) 6459 6460 if retry_strategy: 6461 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6462 self.base_client.add_opc_client_retries_header(header_params) 6463 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6464 return retry_strategy.make_retrying_call( 6465 self.base_client.call_api, 6466 resource_path=resource_path, 6467 method=method, 6468 path_params=path_params, 6469 header_params=header_params) 6470 else: 6471 return self.base_client.call_api( 6472 resource_path=resource_path, 6473 method=method, 6474 path_params=path_params, 6475 header_params=header_params) 6476 6477 def delete_ipv6(self, ipv6_id, **kwargs): 6478 """ 6479 Unassigns and deletes the specified IPv6. You must specify the object's `OCID`__. 6480 The IPv6 address is returned to the subnet's pool of available addresses. 6481 6482 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 6483 6484 6485 :param str ipv6_id: (required) 6486 The `OCID`__ of the IPv6. 6487 6488 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6489 6490 :param str if_match: (optional) 6491 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6492 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6493 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6494 6495 :param str opc_request_id: (optional) 6496 Unique identifier for the request. 6497 If you need to contact Oracle about a particular request, please provide the request ID. 6498 6499 :param obj retry_strategy: (optional) 6500 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6501 6502 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. 6503 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6504 6505 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6506 6507 :return: A :class:`~oci.response.Response` object with data of type None 6508 :rtype: :class:`~oci.response.Response` 6509 6510 :example: 6511 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_ipv6.py.html>`__ to see an example of how to use delete_ipv6 API. 6512 """ 6513 resource_path = "/ipv6/{ipv6Id}" 6514 method = "DELETE" 6515 6516 # Don't accept unknown kwargs 6517 expected_kwargs = [ 6518 "retry_strategy", 6519 "if_match", 6520 "opc_request_id" 6521 ] 6522 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6523 if extra_kwargs: 6524 raise ValueError( 6525 "delete_ipv6 got unknown kwargs: {!r}".format(extra_kwargs)) 6526 6527 path_params = { 6528 "ipv6Id": ipv6_id 6529 } 6530 6531 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6532 6533 for (k, v) in six.iteritems(path_params): 6534 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6535 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6536 6537 header_params = { 6538 "accept": "application/json", 6539 "content-type": "application/json", 6540 "if-match": kwargs.get("if_match", missing), 6541 "opc-request-id": kwargs.get("opc_request_id", missing) 6542 } 6543 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6544 6545 retry_strategy = self.base_client.get_preferred_retry_strategy( 6546 operation_retry_strategy=kwargs.get('retry_strategy'), 6547 client_retry_strategy=self.retry_strategy 6548 ) 6549 6550 if retry_strategy: 6551 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6552 self.base_client.add_opc_client_retries_header(header_params) 6553 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6554 return retry_strategy.make_retrying_call( 6555 self.base_client.call_api, 6556 resource_path=resource_path, 6557 method=method, 6558 path_params=path_params, 6559 header_params=header_params) 6560 else: 6561 return self.base_client.call_api( 6562 resource_path=resource_path, 6563 method=method, 6564 path_params=path_params, 6565 header_params=header_params) 6566 6567 def delete_local_peering_gateway(self, local_peering_gateway_id, **kwargs): 6568 """ 6569 Deletes the specified local peering gateway (LPG). 6570 6571 This is an asynchronous operation; the local peering gateway's `lifecycleState` changes to TERMINATING temporarily 6572 until the local peering gateway is completely removed. 6573 6574 6575 :param str local_peering_gateway_id: (required) 6576 The `OCID`__ of the local peering gateway. 6577 6578 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 6579 6580 :param str if_match: (optional) 6581 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6582 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6583 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6584 6585 :param obj retry_strategy: (optional) 6586 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6587 6588 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. 6589 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6590 6591 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6592 6593 :return: A :class:`~oci.response.Response` object with data of type None 6594 :rtype: :class:`~oci.response.Response` 6595 6596 :example: 6597 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_local_peering_gateway.py.html>`__ to see an example of how to use delete_local_peering_gateway API. 6598 """ 6599 resource_path = "/localPeeringGateways/{localPeeringGatewayId}" 6600 method = "DELETE" 6601 6602 # Don't accept unknown kwargs 6603 expected_kwargs = [ 6604 "retry_strategy", 6605 "if_match" 6606 ] 6607 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6608 if extra_kwargs: 6609 raise ValueError( 6610 "delete_local_peering_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 6611 6612 path_params = { 6613 "localPeeringGatewayId": local_peering_gateway_id 6614 } 6615 6616 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6617 6618 for (k, v) in six.iteritems(path_params): 6619 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6620 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6621 6622 header_params = { 6623 "accept": "application/json", 6624 "content-type": "application/json", 6625 "if-match": kwargs.get("if_match", missing) 6626 } 6627 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6628 6629 retry_strategy = self.base_client.get_preferred_retry_strategy( 6630 operation_retry_strategy=kwargs.get('retry_strategy'), 6631 client_retry_strategy=self.retry_strategy 6632 ) 6633 6634 if retry_strategy: 6635 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6636 self.base_client.add_opc_client_retries_header(header_params) 6637 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6638 return retry_strategy.make_retrying_call( 6639 self.base_client.call_api, 6640 resource_path=resource_path, 6641 method=method, 6642 path_params=path_params, 6643 header_params=header_params) 6644 else: 6645 return self.base_client.call_api( 6646 resource_path=resource_path, 6647 method=method, 6648 path_params=path_params, 6649 header_params=header_params) 6650 6651 def delete_nat_gateway(self, nat_gateway_id, **kwargs): 6652 """ 6653 Deletes the specified NAT gateway. The NAT gateway does not have to be disabled, but there 6654 must not be a route rule that lists the NAT gateway as a target. 6655 6656 This is an asynchronous operation. The NAT gateway's `lifecycleState` will change to 6657 TERMINATING temporarily until the NAT gateway is completely removed. 6658 6659 6660 :param str nat_gateway_id: (required) 6661 The NAT gateway's `OCID`__. 6662 6663 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6664 6665 :param str if_match: (optional) 6666 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6667 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6668 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6669 6670 :param obj retry_strategy: (optional) 6671 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6672 6673 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. 6674 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6675 6676 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6677 6678 :return: A :class:`~oci.response.Response` object with data of type None 6679 :rtype: :class:`~oci.response.Response` 6680 6681 :example: 6682 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_nat_gateway.py.html>`__ to see an example of how to use delete_nat_gateway API. 6683 """ 6684 resource_path = "/natGateways/{natGatewayId}" 6685 method = "DELETE" 6686 6687 # Don't accept unknown kwargs 6688 expected_kwargs = [ 6689 "retry_strategy", 6690 "if_match" 6691 ] 6692 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6693 if extra_kwargs: 6694 raise ValueError( 6695 "delete_nat_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 6696 6697 path_params = { 6698 "natGatewayId": nat_gateway_id 6699 } 6700 6701 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6702 6703 for (k, v) in six.iteritems(path_params): 6704 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6705 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6706 6707 header_params = { 6708 "accept": "application/json", 6709 "content-type": "application/json", 6710 "if-match": kwargs.get("if_match", missing) 6711 } 6712 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6713 6714 retry_strategy = self.base_client.get_preferred_retry_strategy( 6715 operation_retry_strategy=kwargs.get('retry_strategy'), 6716 client_retry_strategy=self.retry_strategy 6717 ) 6718 6719 if retry_strategy: 6720 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6721 self.base_client.add_opc_client_retries_header(header_params) 6722 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6723 return retry_strategy.make_retrying_call( 6724 self.base_client.call_api, 6725 resource_path=resource_path, 6726 method=method, 6727 path_params=path_params, 6728 header_params=header_params) 6729 else: 6730 return self.base_client.call_api( 6731 resource_path=resource_path, 6732 method=method, 6733 path_params=path_params, 6734 header_params=header_params) 6735 6736 def delete_network_security_group(self, network_security_group_id, **kwargs): 6737 """ 6738 Deletes the specified network security group. The group must not contain any VNICs. 6739 6740 To get a list of the VNICs in a network security group, use 6741 :func:`list_network_security_group_vnics`. 6742 Each returned :class:`NetworkSecurityGroupVnic` object 6743 contains both the `OCID`__ of the VNIC and the `OCID`__ of the VNIC's parent resource (for example, 6744 the Compute instance that the VNIC is attached to). 6745 6746 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6747 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6748 6749 6750 :param str network_security_group_id: (required) 6751 The `OCID`__ of the network security group. 6752 6753 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6754 6755 :param str if_match: (optional) 6756 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6757 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6758 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6759 6760 :param obj retry_strategy: (optional) 6761 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6762 6763 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. 6764 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6765 6766 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6767 6768 :return: A :class:`~oci.response.Response` object with data of type None 6769 :rtype: :class:`~oci.response.Response` 6770 6771 :example: 6772 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_network_security_group.py.html>`__ to see an example of how to use delete_network_security_group API. 6773 """ 6774 resource_path = "/networkSecurityGroups/{networkSecurityGroupId}" 6775 method = "DELETE" 6776 6777 # Don't accept unknown kwargs 6778 expected_kwargs = [ 6779 "retry_strategy", 6780 "if_match" 6781 ] 6782 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6783 if extra_kwargs: 6784 raise ValueError( 6785 "delete_network_security_group got unknown kwargs: {!r}".format(extra_kwargs)) 6786 6787 path_params = { 6788 "networkSecurityGroupId": network_security_group_id 6789 } 6790 6791 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6792 6793 for (k, v) in six.iteritems(path_params): 6794 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6795 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6796 6797 header_params = { 6798 "accept": "application/json", 6799 "content-type": "application/json", 6800 "if-match": kwargs.get("if_match", missing) 6801 } 6802 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6803 6804 retry_strategy = self.base_client.get_preferred_retry_strategy( 6805 operation_retry_strategy=kwargs.get('retry_strategy'), 6806 client_retry_strategy=self.retry_strategy 6807 ) 6808 6809 if retry_strategy: 6810 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6811 self.base_client.add_opc_client_retries_header(header_params) 6812 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6813 return retry_strategy.make_retrying_call( 6814 self.base_client.call_api, 6815 resource_path=resource_path, 6816 method=method, 6817 path_params=path_params, 6818 header_params=header_params) 6819 else: 6820 return self.base_client.call_api( 6821 resource_path=resource_path, 6822 method=method, 6823 path_params=path_params, 6824 header_params=header_params) 6825 6826 def delete_private_ip(self, private_ip_id, **kwargs): 6827 """ 6828 Unassigns and deletes the specified private IP. You must 6829 specify the object's `OCID`__. The private IP address is returned to 6830 the subnet's pool of available addresses. 6831 6832 This operation cannot be used with primary private IPs, which are 6833 automatically unassigned and deleted when the VNIC is terminated. 6834 6835 **Important:** If a secondary private IP is the 6836 `target of a route rule`__, 6837 unassigning it from the VNIC causes that route rule to blackhole and the traffic 6838 will be dropped. 6839 6840 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6841 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#privateip 6842 6843 6844 :param str private_ip_id: (required) 6845 The `OCID`__ of the private IP. 6846 6847 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 6848 6849 :param str if_match: (optional) 6850 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6851 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6852 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6853 6854 :param obj retry_strategy: (optional) 6855 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6856 6857 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. 6858 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6859 6860 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6861 6862 :return: A :class:`~oci.response.Response` object with data of type None 6863 :rtype: :class:`~oci.response.Response` 6864 6865 :example: 6866 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_private_ip.py.html>`__ to see an example of how to use delete_private_ip API. 6867 """ 6868 resource_path = "/privateIps/{privateIpId}" 6869 method = "DELETE" 6870 6871 # Don't accept unknown kwargs 6872 expected_kwargs = [ 6873 "retry_strategy", 6874 "if_match" 6875 ] 6876 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6877 if extra_kwargs: 6878 raise ValueError( 6879 "delete_private_ip got unknown kwargs: {!r}".format(extra_kwargs)) 6880 6881 path_params = { 6882 "privateIpId": private_ip_id 6883 } 6884 6885 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6886 6887 for (k, v) in six.iteritems(path_params): 6888 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6889 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6890 6891 header_params = { 6892 "accept": "application/json", 6893 "content-type": "application/json", 6894 "if-match": kwargs.get("if_match", missing) 6895 } 6896 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6897 6898 retry_strategy = self.base_client.get_preferred_retry_strategy( 6899 operation_retry_strategy=kwargs.get('retry_strategy'), 6900 client_retry_strategy=self.retry_strategy 6901 ) 6902 6903 if retry_strategy: 6904 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6905 self.base_client.add_opc_client_retries_header(header_params) 6906 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6907 return retry_strategy.make_retrying_call( 6908 self.base_client.call_api, 6909 resource_path=resource_path, 6910 method=method, 6911 path_params=path_params, 6912 header_params=header_params) 6913 else: 6914 return self.base_client.call_api( 6915 resource_path=resource_path, 6916 method=method, 6917 path_params=path_params, 6918 header_params=header_params) 6919 6920 def delete_public_ip(self, public_ip_id, **kwargs): 6921 """ 6922 Unassigns and deletes the specified public IP (either ephemeral or reserved). 6923 You must specify the object's `OCID`__. The public IP address is returned to the 6924 Oracle Cloud Infrastructure public IP pool. 6925 6926 **Note:** You cannot update, unassign, or delete the public IP that Oracle automatically 6927 assigned to an entity for you (such as a load balancer or NAT gateway). The public IP is 6928 automatically deleted if the assigned entity is terminated. 6929 6930 For an assigned reserved public IP, the initial unassignment portion of this operation 6931 is asynchronous. Poll the public IP's `lifecycleState` to determine 6932 if the operation succeeded. 6933 6934 If you want to simply unassign a reserved public IP and return it to your pool 6935 of reserved public IPs, instead use 6936 :func:`update_public_ip`. 6937 6938 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 6939 6940 6941 :param str public_ip_id: (required) 6942 The `OCID`__ of the public IP. 6943 6944 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 6945 6946 :param str if_match: (optional) 6947 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 6948 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 6949 will be updated or deleted only if the etag you provide matches the resource's current etag value. 6950 6951 :param obj retry_strategy: (optional) 6952 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6953 6954 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. 6955 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6956 6957 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6958 6959 :return: A :class:`~oci.response.Response` object with data of type None 6960 :rtype: :class:`~oci.response.Response` 6961 6962 :example: 6963 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_public_ip.py.html>`__ to see an example of how to use delete_public_ip API. 6964 """ 6965 resource_path = "/publicIps/{publicIpId}" 6966 method = "DELETE" 6967 6968 # Don't accept unknown kwargs 6969 expected_kwargs = [ 6970 "retry_strategy", 6971 "if_match" 6972 ] 6973 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6974 if extra_kwargs: 6975 raise ValueError( 6976 "delete_public_ip got unknown kwargs: {!r}".format(extra_kwargs)) 6977 6978 path_params = { 6979 "publicIpId": public_ip_id 6980 } 6981 6982 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6983 6984 for (k, v) in six.iteritems(path_params): 6985 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6986 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6987 6988 header_params = { 6989 "accept": "application/json", 6990 "content-type": "application/json", 6991 "if-match": kwargs.get("if_match", missing) 6992 } 6993 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6994 6995 retry_strategy = self.base_client.get_preferred_retry_strategy( 6996 operation_retry_strategy=kwargs.get('retry_strategy'), 6997 client_retry_strategy=self.retry_strategy 6998 ) 6999 7000 if retry_strategy: 7001 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7002 self.base_client.add_opc_client_retries_header(header_params) 7003 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7004 return retry_strategy.make_retrying_call( 7005 self.base_client.call_api, 7006 resource_path=resource_path, 7007 method=method, 7008 path_params=path_params, 7009 header_params=header_params) 7010 else: 7011 return self.base_client.call_api( 7012 resource_path=resource_path, 7013 method=method, 7014 path_params=path_params, 7015 header_params=header_params) 7016 7017 def delete_public_ip_pool(self, public_ip_pool_id, **kwargs): 7018 """ 7019 Deletes the specified public IP pool. 7020 To delete a public IP pool it must not have any active IP address allocations. 7021 You must specify the object's `OCID`__ when deleting an IP pool. 7022 7023 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 7024 7025 7026 :param str public_ip_pool_id: (required) 7027 The `OCID`__ of the public IP pool. 7028 7029 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 7030 7031 :param str opc_request_id: (optional) 7032 Unique identifier for the request. 7033 If you need to contact Oracle about a particular request, please provide the request ID. 7034 7035 :param str if_match: (optional) 7036 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7037 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7038 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7039 7040 :param obj retry_strategy: (optional) 7041 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7042 7043 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. 7044 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7045 7046 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7047 7048 :return: A :class:`~oci.response.Response` object with data of type None 7049 :rtype: :class:`~oci.response.Response` 7050 7051 :example: 7052 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_public_ip_pool.py.html>`__ to see an example of how to use delete_public_ip_pool API. 7053 """ 7054 resource_path = "/publicIpPools/{publicIpPoolId}" 7055 method = "DELETE" 7056 7057 # Don't accept unknown kwargs 7058 expected_kwargs = [ 7059 "retry_strategy", 7060 "opc_request_id", 7061 "if_match" 7062 ] 7063 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7064 if extra_kwargs: 7065 raise ValueError( 7066 "delete_public_ip_pool got unknown kwargs: {!r}".format(extra_kwargs)) 7067 7068 path_params = { 7069 "publicIpPoolId": public_ip_pool_id 7070 } 7071 7072 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7073 7074 for (k, v) in six.iteritems(path_params): 7075 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7076 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7077 7078 header_params = { 7079 "accept": "application/json", 7080 "content-type": "application/json", 7081 "opc-request-id": kwargs.get("opc_request_id", missing), 7082 "if-match": kwargs.get("if_match", missing) 7083 } 7084 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7085 7086 retry_strategy = self.base_client.get_preferred_retry_strategy( 7087 operation_retry_strategy=kwargs.get('retry_strategy'), 7088 client_retry_strategy=self.retry_strategy 7089 ) 7090 7091 if retry_strategy: 7092 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7093 self.base_client.add_opc_client_retries_header(header_params) 7094 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7095 return retry_strategy.make_retrying_call( 7096 self.base_client.call_api, 7097 resource_path=resource_path, 7098 method=method, 7099 path_params=path_params, 7100 header_params=header_params) 7101 else: 7102 return self.base_client.call_api( 7103 resource_path=resource_path, 7104 method=method, 7105 path_params=path_params, 7106 header_params=header_params) 7107 7108 def delete_remote_peering_connection(self, remote_peering_connection_id, **kwargs): 7109 """ 7110 Deletes the remote peering connection (RPC). 7111 7112 This is an asynchronous operation; the RPC's `lifecycleState` changes to TERMINATING temporarily 7113 until the RPC is completely removed. 7114 7115 7116 :param str remote_peering_connection_id: (required) 7117 The `OCID`__ of the remote peering connection (RPC). 7118 7119 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 7120 7121 :param str if_match: (optional) 7122 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7123 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7124 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7125 7126 :param obj retry_strategy: (optional) 7127 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7128 7129 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. 7130 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7131 7132 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7133 7134 :return: A :class:`~oci.response.Response` object with data of type None 7135 :rtype: :class:`~oci.response.Response` 7136 7137 :example: 7138 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_remote_peering_connection.py.html>`__ to see an example of how to use delete_remote_peering_connection API. 7139 """ 7140 resource_path = "/remotePeeringConnections/{remotePeeringConnectionId}" 7141 method = "DELETE" 7142 7143 # Don't accept unknown kwargs 7144 expected_kwargs = [ 7145 "retry_strategy", 7146 "if_match" 7147 ] 7148 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7149 if extra_kwargs: 7150 raise ValueError( 7151 "delete_remote_peering_connection got unknown kwargs: {!r}".format(extra_kwargs)) 7152 7153 path_params = { 7154 "remotePeeringConnectionId": remote_peering_connection_id 7155 } 7156 7157 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7158 7159 for (k, v) in six.iteritems(path_params): 7160 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7161 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7162 7163 header_params = { 7164 "accept": "application/json", 7165 "content-type": "application/json", 7166 "if-match": kwargs.get("if_match", missing) 7167 } 7168 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7169 7170 retry_strategy = self.base_client.get_preferred_retry_strategy( 7171 operation_retry_strategy=kwargs.get('retry_strategy'), 7172 client_retry_strategy=self.retry_strategy 7173 ) 7174 7175 if retry_strategy: 7176 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7177 self.base_client.add_opc_client_retries_header(header_params) 7178 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7179 return retry_strategy.make_retrying_call( 7180 self.base_client.call_api, 7181 resource_path=resource_path, 7182 method=method, 7183 path_params=path_params, 7184 header_params=header_params) 7185 else: 7186 return self.base_client.call_api( 7187 resource_path=resource_path, 7188 method=method, 7189 path_params=path_params, 7190 header_params=header_params) 7191 7192 def delete_route_table(self, rt_id, **kwargs): 7193 """ 7194 Deletes the specified route table, but only if it's not associated with a subnet. You can't delete a 7195 VCN's default route table. 7196 7197 This is an asynchronous operation. The route table's `lifecycleState` will change to TERMINATING temporarily 7198 until the route table is completely removed. 7199 7200 7201 :param str rt_id: (required) 7202 The `OCID`__ of the route table. 7203 7204 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 7205 7206 :param str if_match: (optional) 7207 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7208 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7209 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7210 7211 :param obj retry_strategy: (optional) 7212 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7213 7214 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. 7215 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7216 7217 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7218 7219 :return: A :class:`~oci.response.Response` object with data of type None 7220 :rtype: :class:`~oci.response.Response` 7221 7222 :example: 7223 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_route_table.py.html>`__ to see an example of how to use delete_route_table API. 7224 """ 7225 resource_path = "/routeTables/{rtId}" 7226 method = "DELETE" 7227 7228 # Don't accept unknown kwargs 7229 expected_kwargs = [ 7230 "retry_strategy", 7231 "if_match" 7232 ] 7233 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7234 if extra_kwargs: 7235 raise ValueError( 7236 "delete_route_table got unknown kwargs: {!r}".format(extra_kwargs)) 7237 7238 path_params = { 7239 "rtId": rt_id 7240 } 7241 7242 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7243 7244 for (k, v) in six.iteritems(path_params): 7245 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7246 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7247 7248 header_params = { 7249 "accept": "application/json", 7250 "content-type": "application/json", 7251 "if-match": kwargs.get("if_match", missing) 7252 } 7253 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7254 7255 retry_strategy = self.base_client.get_preferred_retry_strategy( 7256 operation_retry_strategy=kwargs.get('retry_strategy'), 7257 client_retry_strategy=self.retry_strategy 7258 ) 7259 7260 if retry_strategy: 7261 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7262 self.base_client.add_opc_client_retries_header(header_params) 7263 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7264 return retry_strategy.make_retrying_call( 7265 self.base_client.call_api, 7266 resource_path=resource_path, 7267 method=method, 7268 path_params=path_params, 7269 header_params=header_params) 7270 else: 7271 return self.base_client.call_api( 7272 resource_path=resource_path, 7273 method=method, 7274 path_params=path_params, 7275 header_params=header_params) 7276 7277 def delete_security_list(self, security_list_id, **kwargs): 7278 """ 7279 Deletes the specified security list, but only if it's not associated with a subnet. You can't delete 7280 a VCN's default security list. 7281 7282 This is an asynchronous operation. The security list's `lifecycleState` will change to TERMINATING temporarily 7283 until the security list is completely removed. 7284 7285 7286 :param str security_list_id: (required) 7287 The `OCID`__ of the security list. 7288 7289 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 7290 7291 :param str if_match: (optional) 7292 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7293 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7294 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7295 7296 :param obj retry_strategy: (optional) 7297 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7298 7299 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. 7300 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7301 7302 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7303 7304 :return: A :class:`~oci.response.Response` object with data of type None 7305 :rtype: :class:`~oci.response.Response` 7306 7307 :example: 7308 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_security_list.py.html>`__ to see an example of how to use delete_security_list API. 7309 """ 7310 resource_path = "/securityLists/{securityListId}" 7311 method = "DELETE" 7312 7313 # Don't accept unknown kwargs 7314 expected_kwargs = [ 7315 "retry_strategy", 7316 "if_match" 7317 ] 7318 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7319 if extra_kwargs: 7320 raise ValueError( 7321 "delete_security_list got unknown kwargs: {!r}".format(extra_kwargs)) 7322 7323 path_params = { 7324 "securityListId": security_list_id 7325 } 7326 7327 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7328 7329 for (k, v) in six.iteritems(path_params): 7330 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7331 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7332 7333 header_params = { 7334 "accept": "application/json", 7335 "content-type": "application/json", 7336 "if-match": kwargs.get("if_match", missing) 7337 } 7338 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7339 7340 retry_strategy = self.base_client.get_preferred_retry_strategy( 7341 operation_retry_strategy=kwargs.get('retry_strategy'), 7342 client_retry_strategy=self.retry_strategy 7343 ) 7344 7345 if retry_strategy: 7346 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7347 self.base_client.add_opc_client_retries_header(header_params) 7348 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7349 return retry_strategy.make_retrying_call( 7350 self.base_client.call_api, 7351 resource_path=resource_path, 7352 method=method, 7353 path_params=path_params, 7354 header_params=header_params) 7355 else: 7356 return self.base_client.call_api( 7357 resource_path=resource_path, 7358 method=method, 7359 path_params=path_params, 7360 header_params=header_params) 7361 7362 def delete_service_gateway(self, service_gateway_id, **kwargs): 7363 """ 7364 Deletes the specified service gateway. There must not be a route table that lists the service 7365 gateway as a target. 7366 7367 7368 :param str service_gateway_id: (required) 7369 The service gateway's `OCID`__. 7370 7371 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 7372 7373 :param str if_match: (optional) 7374 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7375 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7376 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7377 7378 :param obj retry_strategy: (optional) 7379 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7380 7381 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. 7382 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7383 7384 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7385 7386 :return: A :class:`~oci.response.Response` object with data of type None 7387 :rtype: :class:`~oci.response.Response` 7388 7389 :example: 7390 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_service_gateway.py.html>`__ to see an example of how to use delete_service_gateway API. 7391 """ 7392 resource_path = "/serviceGateways/{serviceGatewayId}" 7393 method = "DELETE" 7394 7395 # Don't accept unknown kwargs 7396 expected_kwargs = [ 7397 "retry_strategy", 7398 "if_match" 7399 ] 7400 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7401 if extra_kwargs: 7402 raise ValueError( 7403 "delete_service_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 7404 7405 path_params = { 7406 "serviceGatewayId": service_gateway_id 7407 } 7408 7409 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7410 7411 for (k, v) in six.iteritems(path_params): 7412 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7413 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7414 7415 header_params = { 7416 "accept": "application/json", 7417 "content-type": "application/json", 7418 "if-match": kwargs.get("if_match", missing) 7419 } 7420 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7421 7422 retry_strategy = self.base_client.get_preferred_retry_strategy( 7423 operation_retry_strategy=kwargs.get('retry_strategy'), 7424 client_retry_strategy=self.retry_strategy 7425 ) 7426 7427 if retry_strategy: 7428 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7429 self.base_client.add_opc_client_retries_header(header_params) 7430 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7431 return retry_strategy.make_retrying_call( 7432 self.base_client.call_api, 7433 resource_path=resource_path, 7434 method=method, 7435 path_params=path_params, 7436 header_params=header_params) 7437 else: 7438 return self.base_client.call_api( 7439 resource_path=resource_path, 7440 method=method, 7441 path_params=path_params, 7442 header_params=header_params) 7443 7444 def delete_subnet(self, subnet_id, **kwargs): 7445 """ 7446 Deletes the specified subnet, but only if there are no instances in the subnet. This is an asynchronous 7447 operation. The subnet's `lifecycleState` will change to TERMINATING temporarily. If there are any 7448 instances in the subnet, the state will instead change back to AVAILABLE. 7449 7450 7451 :param str subnet_id: (required) 7452 The `OCID`__ of the subnet. 7453 7454 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 7455 7456 :param str if_match: (optional) 7457 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7458 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7459 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7460 7461 :param obj retry_strategy: (optional) 7462 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7463 7464 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. 7465 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7466 7467 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7468 7469 :return: A :class:`~oci.response.Response` object with data of type None 7470 :rtype: :class:`~oci.response.Response` 7471 7472 :example: 7473 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_subnet.py.html>`__ to see an example of how to use delete_subnet API. 7474 """ 7475 resource_path = "/subnets/{subnetId}" 7476 method = "DELETE" 7477 7478 # Don't accept unknown kwargs 7479 expected_kwargs = [ 7480 "retry_strategy", 7481 "if_match" 7482 ] 7483 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7484 if extra_kwargs: 7485 raise ValueError( 7486 "delete_subnet got unknown kwargs: {!r}".format(extra_kwargs)) 7487 7488 path_params = { 7489 "subnetId": subnet_id 7490 } 7491 7492 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7493 7494 for (k, v) in six.iteritems(path_params): 7495 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7496 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7497 7498 header_params = { 7499 "accept": "application/json", 7500 "content-type": "application/json", 7501 "if-match": kwargs.get("if_match", missing) 7502 } 7503 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7504 7505 retry_strategy = self.base_client.get_preferred_retry_strategy( 7506 operation_retry_strategy=kwargs.get('retry_strategy'), 7507 client_retry_strategy=self.retry_strategy 7508 ) 7509 7510 if retry_strategy: 7511 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7512 self.base_client.add_opc_client_retries_header(header_params) 7513 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7514 return retry_strategy.make_retrying_call( 7515 self.base_client.call_api, 7516 resource_path=resource_path, 7517 method=method, 7518 path_params=path_params, 7519 header_params=header_params) 7520 else: 7521 return self.base_client.call_api( 7522 resource_path=resource_path, 7523 method=method, 7524 path_params=path_params, 7525 header_params=header_params) 7526 7527 def delete_vcn(self, vcn_id, **kwargs): 7528 """ 7529 Deletes the specified VCN. The VCN must be empty and have no attached gateways. This is an asynchronous 7530 operation. The VCN's `lifecycleState` will change to TERMINATING temporarily until the VCN is completely 7531 removed. 7532 7533 7534 :param str vcn_id: (required) 7535 The `OCID`__ of the VCN. 7536 7537 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 7538 7539 :param str if_match: (optional) 7540 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7541 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7542 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7543 7544 :param obj retry_strategy: (optional) 7545 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7546 7547 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. 7548 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7549 7550 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7551 7552 :return: A :class:`~oci.response.Response` object with data of type None 7553 :rtype: :class:`~oci.response.Response` 7554 7555 :example: 7556 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_vcn.py.html>`__ to see an example of how to use delete_vcn API. 7557 """ 7558 resource_path = "/vcns/{vcnId}" 7559 method = "DELETE" 7560 7561 # Don't accept unknown kwargs 7562 expected_kwargs = [ 7563 "retry_strategy", 7564 "if_match" 7565 ] 7566 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7567 if extra_kwargs: 7568 raise ValueError( 7569 "delete_vcn got unknown kwargs: {!r}".format(extra_kwargs)) 7570 7571 path_params = { 7572 "vcnId": vcn_id 7573 } 7574 7575 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7576 7577 for (k, v) in six.iteritems(path_params): 7578 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7579 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7580 7581 header_params = { 7582 "accept": "application/json", 7583 "content-type": "application/json", 7584 "if-match": kwargs.get("if_match", missing) 7585 } 7586 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7587 7588 retry_strategy = self.base_client.get_preferred_retry_strategy( 7589 operation_retry_strategy=kwargs.get('retry_strategy'), 7590 client_retry_strategy=self.retry_strategy 7591 ) 7592 7593 if retry_strategy: 7594 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7595 self.base_client.add_opc_client_retries_header(header_params) 7596 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7597 return retry_strategy.make_retrying_call( 7598 self.base_client.call_api, 7599 resource_path=resource_path, 7600 method=method, 7601 path_params=path_params, 7602 header_params=header_params) 7603 else: 7604 return self.base_client.call_api( 7605 resource_path=resource_path, 7606 method=method, 7607 path_params=path_params, 7608 header_params=header_params) 7609 7610 def delete_virtual_circuit(self, virtual_circuit_id, **kwargs): 7611 """ 7612 Deletes the specified virtual circuit. 7613 7614 **Important:** If you're using FastConnect via a provider, 7615 make sure to also terminate the connection with 7616 the provider, or else the provider may continue to bill you. 7617 7618 7619 :param str virtual_circuit_id: (required) 7620 The `OCID`__ of the virtual circuit. 7621 7622 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 7623 7624 :param str if_match: (optional) 7625 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7626 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7627 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7628 7629 :param obj retry_strategy: (optional) 7630 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7631 7632 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. 7633 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7634 7635 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7636 7637 :return: A :class:`~oci.response.Response` object with data of type None 7638 :rtype: :class:`~oci.response.Response` 7639 7640 :example: 7641 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_virtual_circuit.py.html>`__ to see an example of how to use delete_virtual_circuit API. 7642 """ 7643 resource_path = "/virtualCircuits/{virtualCircuitId}" 7644 method = "DELETE" 7645 7646 # Don't accept unknown kwargs 7647 expected_kwargs = [ 7648 "retry_strategy", 7649 "if_match" 7650 ] 7651 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7652 if extra_kwargs: 7653 raise ValueError( 7654 "delete_virtual_circuit got unknown kwargs: {!r}".format(extra_kwargs)) 7655 7656 path_params = { 7657 "virtualCircuitId": virtual_circuit_id 7658 } 7659 7660 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7661 7662 for (k, v) in six.iteritems(path_params): 7663 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7664 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7665 7666 header_params = { 7667 "accept": "application/json", 7668 "content-type": "application/json", 7669 "if-match": kwargs.get("if_match", missing) 7670 } 7671 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7672 7673 retry_strategy = self.base_client.get_preferred_retry_strategy( 7674 operation_retry_strategy=kwargs.get('retry_strategy'), 7675 client_retry_strategy=self.retry_strategy 7676 ) 7677 7678 if retry_strategy: 7679 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7680 self.base_client.add_opc_client_retries_header(header_params) 7681 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7682 return retry_strategy.make_retrying_call( 7683 self.base_client.call_api, 7684 resource_path=resource_path, 7685 method=method, 7686 path_params=path_params, 7687 header_params=header_params) 7688 else: 7689 return self.base_client.call_api( 7690 resource_path=resource_path, 7691 method=method, 7692 path_params=path_params, 7693 header_params=header_params) 7694 7695 def delete_vlan(self, vlan_id, **kwargs): 7696 """ 7697 Deletes the specified VLAN, but only if there are no VNICs in the VLAN. 7698 7699 7700 :param str vlan_id: (required) 7701 The `OCID`__ of the VLAN. 7702 7703 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 7704 7705 :param str if_match: (optional) 7706 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7707 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7708 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7709 7710 :param str opc_request_id: (optional) 7711 Unique identifier for the request. 7712 If you need to contact Oracle about a particular request, please provide the request ID. 7713 7714 :param obj retry_strategy: (optional) 7715 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7716 7717 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. 7718 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7719 7720 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7721 7722 :return: A :class:`~oci.response.Response` object with data of type None 7723 :rtype: :class:`~oci.response.Response` 7724 7725 :example: 7726 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_vlan.py.html>`__ to see an example of how to use delete_vlan API. 7727 """ 7728 resource_path = "/vlans/{vlanId}" 7729 method = "DELETE" 7730 7731 # Don't accept unknown kwargs 7732 expected_kwargs = [ 7733 "retry_strategy", 7734 "if_match", 7735 "opc_request_id" 7736 ] 7737 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7738 if extra_kwargs: 7739 raise ValueError( 7740 "delete_vlan got unknown kwargs: {!r}".format(extra_kwargs)) 7741 7742 path_params = { 7743 "vlanId": vlan_id 7744 } 7745 7746 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7747 7748 for (k, v) in six.iteritems(path_params): 7749 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7750 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7751 7752 header_params = { 7753 "accept": "application/json", 7754 "content-type": "application/json", 7755 "if-match": kwargs.get("if_match", missing), 7756 "opc-request-id": kwargs.get("opc_request_id", missing) 7757 } 7758 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7759 7760 retry_strategy = self.base_client.get_preferred_retry_strategy( 7761 operation_retry_strategy=kwargs.get('retry_strategy'), 7762 client_retry_strategy=self.retry_strategy 7763 ) 7764 7765 if retry_strategy: 7766 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7767 self.base_client.add_opc_client_retries_header(header_params) 7768 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7769 return retry_strategy.make_retrying_call( 7770 self.base_client.call_api, 7771 resource_path=resource_path, 7772 method=method, 7773 path_params=path_params, 7774 header_params=header_params) 7775 else: 7776 return self.base_client.call_api( 7777 resource_path=resource_path, 7778 method=method, 7779 path_params=path_params, 7780 header_params=header_params) 7781 7782 def detach_service_id(self, service_gateway_id, detach_service_details, **kwargs): 7783 """ 7784 Removes the specified :class:`Service` from the list of enabled 7785 `Service` objects for the specified gateway. You do not need to remove any route 7786 rules that specify this `Service` object's `cidrBlock` as the destination CIDR. However, consider 7787 removing the rules if your intent is to permanently disable use of the `Service` through this 7788 service gateway. 7789 7790 **Note:** The `DetachServiceId` operation is an easy way to remove an individual `Service` from 7791 the service gateway. Compare it with 7792 :func:`update_service_gateway`, which replaces 7793 the entire existing list of enabled `Service` objects with the list that you provide in the 7794 `Update` call. `UpdateServiceGateway` also lets you block all traffic through the service 7795 gateway without having to remove each of the individual `Service` objects. 7796 7797 7798 :param str service_gateway_id: (required) 7799 The service gateway's `OCID`__. 7800 7801 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 7802 7803 :param oci.core.models.ServiceIdRequestDetails detach_service_details: (required) 7804 ServiceId of Service to be detached from a service gateway. 7805 7806 :param str if_match: (optional) 7807 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 7808 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 7809 will be updated or deleted only if the etag you provide matches the resource's current etag value. 7810 7811 :param obj retry_strategy: (optional) 7812 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7813 7814 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. 7815 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7816 7817 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7818 7819 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ServiceGateway` 7820 :rtype: :class:`~oci.response.Response` 7821 7822 :example: 7823 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/detach_service_id.py.html>`__ to see an example of how to use detach_service_id API. 7824 """ 7825 resource_path = "/serviceGateways/{serviceGatewayId}/actions/detachService" 7826 method = "POST" 7827 7828 # Don't accept unknown kwargs 7829 expected_kwargs = [ 7830 "retry_strategy", 7831 "if_match" 7832 ] 7833 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7834 if extra_kwargs: 7835 raise ValueError( 7836 "detach_service_id got unknown kwargs: {!r}".format(extra_kwargs)) 7837 7838 path_params = { 7839 "serviceGatewayId": service_gateway_id 7840 } 7841 7842 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7843 7844 for (k, v) in six.iteritems(path_params): 7845 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7846 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7847 7848 header_params = { 7849 "accept": "application/json", 7850 "content-type": "application/json", 7851 "if-match": kwargs.get("if_match", missing) 7852 } 7853 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7854 7855 retry_strategy = self.base_client.get_preferred_retry_strategy( 7856 operation_retry_strategy=kwargs.get('retry_strategy'), 7857 client_retry_strategy=self.retry_strategy 7858 ) 7859 7860 if retry_strategy: 7861 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7862 self.base_client.add_opc_client_retries_header(header_params) 7863 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7864 return retry_strategy.make_retrying_call( 7865 self.base_client.call_api, 7866 resource_path=resource_path, 7867 method=method, 7868 path_params=path_params, 7869 header_params=header_params, 7870 body=detach_service_details, 7871 response_type="ServiceGateway") 7872 else: 7873 return self.base_client.call_api( 7874 resource_path=resource_path, 7875 method=method, 7876 path_params=path_params, 7877 header_params=header_params, 7878 body=detach_service_details, 7879 response_type="ServiceGateway") 7880 7881 def get_all_drg_attachments(self, drg_id, **kwargs): 7882 """ 7883 Returns a complete list of DRG attachments that belong to a particular DRG. 7884 7885 7886 :param str drg_id: (required) 7887 The `OCID`__ of the DRG. 7888 7889 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 7890 7891 :param str opc_request_id: (optional) 7892 Unique identifier for the request. 7893 If you need to contact Oracle about a particular request, please provide the request ID. 7894 7895 :param int limit: (optional) 7896 For list pagination. The maximum number of results per page, or items to return in a paginated 7897 \"List\" call. For important details about how pagination works, see 7898 `List Pagination`__. 7899 7900 Example: `50` 7901 7902 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 7903 7904 :param str page: (optional) 7905 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 7906 call. For important details about how pagination works, see 7907 `List Pagination`__. 7908 7909 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 7910 7911 :param str attachment_type: (optional) 7912 The type for the network resource attached to the DRG. 7913 7914 Allowed values are: "VCN", "VIRTUAL_CIRCUIT", "REMOTE_PEERING_CONNECTION", "IPSEC_TUNNEL", "ALL" 7915 7916 :param bool is_cross_tenancy: (optional) 7917 Whether the DRG attachment lives in a different tenancy than the DRG. 7918 7919 :param obj retry_strategy: (optional) 7920 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7921 7922 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. 7923 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7924 7925 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7926 7927 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgAttachmentInfo` 7928 :rtype: :class:`~oci.response.Response` 7929 7930 :example: 7931 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_all_drg_attachments.py.html>`__ to see an example of how to use get_all_drg_attachments API. 7932 """ 7933 resource_path = "/drgs/{drgId}/actions/getAllDrgAttachments" 7934 method = "POST" 7935 7936 # Don't accept unknown kwargs 7937 expected_kwargs = [ 7938 "retry_strategy", 7939 "opc_request_id", 7940 "limit", 7941 "page", 7942 "attachment_type", 7943 "is_cross_tenancy" 7944 ] 7945 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7946 if extra_kwargs: 7947 raise ValueError( 7948 "get_all_drg_attachments got unknown kwargs: {!r}".format(extra_kwargs)) 7949 7950 path_params = { 7951 "drgId": drg_id 7952 } 7953 7954 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7955 7956 for (k, v) in six.iteritems(path_params): 7957 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7958 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7959 7960 if 'attachment_type' in kwargs: 7961 attachment_type_allowed_values = ["VCN", "VIRTUAL_CIRCUIT", "REMOTE_PEERING_CONNECTION", "IPSEC_TUNNEL", "ALL"] 7962 if kwargs['attachment_type'] not in attachment_type_allowed_values: 7963 raise ValueError( 7964 "Invalid value for `attachment_type`, must be one of {0}".format(attachment_type_allowed_values) 7965 ) 7966 7967 query_params = { 7968 "limit": kwargs.get("limit", missing), 7969 "page": kwargs.get("page", missing), 7970 "attachmentType": kwargs.get("attachment_type", missing), 7971 "isCrossTenancy": kwargs.get("is_cross_tenancy", missing) 7972 } 7973 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 7974 7975 header_params = { 7976 "accept": "application/json", 7977 "content-type": "application/json", 7978 "opc-request-id": kwargs.get("opc_request_id", missing) 7979 } 7980 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7981 7982 retry_strategy = self.base_client.get_preferred_retry_strategy( 7983 operation_retry_strategy=kwargs.get('retry_strategy'), 7984 client_retry_strategy=self.retry_strategy 7985 ) 7986 7987 if retry_strategy: 7988 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7989 self.base_client.add_opc_client_retries_header(header_params) 7990 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7991 return retry_strategy.make_retrying_call( 7992 self.base_client.call_api, 7993 resource_path=resource_path, 7994 method=method, 7995 path_params=path_params, 7996 query_params=query_params, 7997 header_params=header_params, 7998 response_type="list[DrgAttachmentInfo]") 7999 else: 8000 return self.base_client.call_api( 8001 resource_path=resource_path, 8002 method=method, 8003 path_params=path_params, 8004 query_params=query_params, 8005 header_params=header_params, 8006 response_type="list[DrgAttachmentInfo]") 8007 8008 def get_allowed_ike_ip_sec_parameters(self, **kwargs): 8009 """ 8010 The allowed parameters for IKE IPSec 8011 8012 8013 :param str opc_request_id: (optional) 8014 Unique identifier for the request. 8015 If you need to contact Oracle about a particular request, please provide the request ID. 8016 8017 :param obj retry_strategy: (optional) 8018 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8019 8020 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. 8021 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8022 8023 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8024 8025 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.AllowedIkeIPSecParameters` 8026 :rtype: :class:`~oci.response.Response` 8027 8028 :example: 8029 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_allowed_ike_ip_sec_parameters.py.html>`__ to see an example of how to use get_allowed_ike_ip_sec_parameters API. 8030 """ 8031 resource_path = "/ipsecAlgorithms" 8032 method = "GET" 8033 8034 # Don't accept unknown kwargs 8035 expected_kwargs = [ 8036 "retry_strategy", 8037 "opc_request_id" 8038 ] 8039 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8040 if extra_kwargs: 8041 raise ValueError( 8042 "get_allowed_ike_ip_sec_parameters got unknown kwargs: {!r}".format(extra_kwargs)) 8043 8044 header_params = { 8045 "accept": "application/json", 8046 "content-type": "application/json", 8047 "opc-request-id": kwargs.get("opc_request_id", missing) 8048 } 8049 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8050 8051 retry_strategy = self.base_client.get_preferred_retry_strategy( 8052 operation_retry_strategy=kwargs.get('retry_strategy'), 8053 client_retry_strategy=self.retry_strategy 8054 ) 8055 8056 if retry_strategy: 8057 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8058 self.base_client.add_opc_client_retries_header(header_params) 8059 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8060 return retry_strategy.make_retrying_call( 8061 self.base_client.call_api, 8062 resource_path=resource_path, 8063 method=method, 8064 header_params=header_params, 8065 response_type="AllowedIkeIPSecParameters") 8066 else: 8067 return self.base_client.call_api( 8068 resource_path=resource_path, 8069 method=method, 8070 header_params=header_params, 8071 response_type="AllowedIkeIPSecParameters") 8072 8073 def get_byoip_range(self, byoip_range_id, **kwargs): 8074 """ 8075 Gets the `ByoipRange` resource. You must specify the `OCID`__. 8076 8077 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 8078 8079 8080 :param str byoip_range_id: (required) 8081 The `OCID`__ of the `ByoipRange` resource containing the BYOIP CIDR block. 8082 8083 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 8084 8085 :param str opc_request_id: (optional) 8086 Unique identifier for the request. 8087 If you need to contact Oracle about a particular request, please provide the request ID. 8088 8089 :param obj retry_strategy: (optional) 8090 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8091 8092 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. 8093 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8094 8095 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8096 8097 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipRange` 8098 :rtype: :class:`~oci.response.Response` 8099 8100 :example: 8101 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_byoip_range.py.html>`__ to see an example of how to use get_byoip_range API. 8102 """ 8103 resource_path = "/byoipRanges/{byoipRangeId}" 8104 method = "GET" 8105 8106 # Don't accept unknown kwargs 8107 expected_kwargs = [ 8108 "retry_strategy", 8109 "opc_request_id" 8110 ] 8111 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8112 if extra_kwargs: 8113 raise ValueError( 8114 "get_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) 8115 8116 path_params = { 8117 "byoipRangeId": byoip_range_id 8118 } 8119 8120 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8121 8122 for (k, v) in six.iteritems(path_params): 8123 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8124 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8125 8126 header_params = { 8127 "accept": "application/json", 8128 "content-type": "application/json", 8129 "opc-request-id": kwargs.get("opc_request_id", missing) 8130 } 8131 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8132 8133 retry_strategy = self.base_client.get_preferred_retry_strategy( 8134 operation_retry_strategy=kwargs.get('retry_strategy'), 8135 client_retry_strategy=self.retry_strategy 8136 ) 8137 8138 if retry_strategy: 8139 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8140 self.base_client.add_opc_client_retries_header(header_params) 8141 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8142 return retry_strategy.make_retrying_call( 8143 self.base_client.call_api, 8144 resource_path=resource_path, 8145 method=method, 8146 path_params=path_params, 8147 header_params=header_params, 8148 response_type="ByoipRange") 8149 else: 8150 return self.base_client.call_api( 8151 resource_path=resource_path, 8152 method=method, 8153 path_params=path_params, 8154 header_params=header_params, 8155 response_type="ByoipRange") 8156 8157 def get_cpe(self, cpe_id, **kwargs): 8158 """ 8159 Gets the specified CPE's information. 8160 8161 8162 :param str cpe_id: (required) 8163 The `OCID`__ of the CPE. 8164 8165 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 8166 8167 :param obj retry_strategy: (optional) 8168 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8169 8170 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. 8171 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8172 8173 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8174 8175 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Cpe` 8176 :rtype: :class:`~oci.response.Response` 8177 8178 :example: 8179 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_cpe.py.html>`__ to see an example of how to use get_cpe API. 8180 """ 8181 resource_path = "/cpes/{cpeId}" 8182 method = "GET" 8183 8184 expected_kwargs = ["retry_strategy"] 8185 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8186 if extra_kwargs: 8187 raise ValueError( 8188 "get_cpe got unknown kwargs: {!r}".format(extra_kwargs)) 8189 8190 path_params = { 8191 "cpeId": cpe_id 8192 } 8193 8194 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8195 8196 for (k, v) in six.iteritems(path_params): 8197 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8198 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8199 8200 header_params = { 8201 "accept": "application/json", 8202 "content-type": "application/json" 8203 } 8204 8205 retry_strategy = self.base_client.get_preferred_retry_strategy( 8206 operation_retry_strategy=kwargs.get('retry_strategy'), 8207 client_retry_strategy=self.retry_strategy 8208 ) 8209 8210 if retry_strategy: 8211 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8212 self.base_client.add_opc_client_retries_header(header_params) 8213 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8214 return retry_strategy.make_retrying_call( 8215 self.base_client.call_api, 8216 resource_path=resource_path, 8217 method=method, 8218 path_params=path_params, 8219 header_params=header_params, 8220 response_type="Cpe") 8221 else: 8222 return self.base_client.call_api( 8223 resource_path=resource_path, 8224 method=method, 8225 path_params=path_params, 8226 header_params=header_params, 8227 response_type="Cpe") 8228 8229 def get_cpe_device_config_content(self, cpe_id, **kwargs): 8230 """ 8231 Renders a set of CPE configuration content that can help a network engineer configure the actual 8232 CPE device (for example, a hardware router) represented by the specified :class:`Cpe` 8233 object. 8234 8235 The rendered content is specific to the type of CPE device (for example, Cisco ASA). Therefore the 8236 :class:`Cpe` must have the CPE's device type specified by the `cpeDeviceShapeId` 8237 attribute. The content optionally includes answers that the customer provides (see 8238 :func:`update_tunnel_cpe_device_config`), 8239 merged with a template of other information specific to the CPE device type. 8240 8241 The operation returns configuration information for *all* of the 8242 :class:`IPSecConnection` objects that use the specified CPE. 8243 Here are similar operations: 8244 8245 * :func:`get_ipsec_cpe_device_config_content` 8246 returns CPE configuration content for all IPSec tunnels in a single IPSec connection. 8247 * :func:`get_tunnel_cpe_device_config_content` 8248 returns CPE configuration content for a specific IPSec tunnel in an IPSec connection. 8249 8250 8251 :param str cpe_id: (required) 8252 The `OCID`__ of the CPE. 8253 8254 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 8255 8256 :param str opc_request_id: (optional) 8257 Unique identifier for the request. 8258 If you need to contact Oracle about a particular request, please provide the request ID. 8259 8260 :param obj retry_strategy: (optional) 8261 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8262 8263 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. 8264 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8265 8266 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8267 8268 :return: A :class:`~oci.response.Response` object with data of type stream 8269 :rtype: :class:`~oci.response.Response` 8270 8271 :example: 8272 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_cpe_device_config_content.py.html>`__ to see an example of how to use get_cpe_device_config_content API. 8273 """ 8274 resource_path = "/cpes/{cpeId}/cpeConfigContent" 8275 method = "GET" 8276 8277 # Don't accept unknown kwargs 8278 expected_kwargs = [ 8279 "retry_strategy", 8280 "opc_request_id" 8281 ] 8282 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8283 if extra_kwargs: 8284 raise ValueError( 8285 "get_cpe_device_config_content got unknown kwargs: {!r}".format(extra_kwargs)) 8286 8287 path_params = { 8288 "cpeId": cpe_id 8289 } 8290 8291 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8292 8293 for (k, v) in six.iteritems(path_params): 8294 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8295 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8296 8297 header_params = { 8298 "accept": "text/plain; charset=utf-8", 8299 "content-type": "application/json", 8300 "opc-request-id": kwargs.get("opc_request_id", missing) 8301 } 8302 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8303 8304 retry_strategy = self.base_client.get_preferred_retry_strategy( 8305 operation_retry_strategy=kwargs.get('retry_strategy'), 8306 client_retry_strategy=self.retry_strategy 8307 ) 8308 8309 if retry_strategy: 8310 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8311 self.base_client.add_opc_client_retries_header(header_params) 8312 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8313 return retry_strategy.make_retrying_call( 8314 self.base_client.call_api, 8315 resource_path=resource_path, 8316 method=method, 8317 path_params=path_params, 8318 header_params=header_params, 8319 response_type="stream") 8320 else: 8321 return self.base_client.call_api( 8322 resource_path=resource_path, 8323 method=method, 8324 path_params=path_params, 8325 header_params=header_params, 8326 response_type="stream") 8327 8328 def get_cpe_device_shape(self, cpe_device_shape_id, **kwargs): 8329 """ 8330 Gets the detailed information about the specified CPE device type. This might include a set of questions 8331 that are specific to the particular CPE device type. The customer must supply answers to those questions 8332 (see :func:`update_tunnel_cpe_device_config`). 8333 The service merges the answers with a template of other information for the CPE device type. The following 8334 operations return the merged content: 8335 8336 * :func:`get_cpe_device_config_content` 8337 * :func:`get_ipsec_cpe_device_config_content` 8338 * :func:`get_tunnel_cpe_device_config_content` 8339 8340 8341 :param str cpe_device_shape_id: (required) 8342 The `OCID`__ of the CPE device shape. 8343 8344 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 8345 8346 :param str opc_request_id: (optional) 8347 Unique identifier for the request. 8348 If you need to contact Oracle about a particular request, please provide the request ID. 8349 8350 :param obj retry_strategy: (optional) 8351 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8352 8353 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. 8354 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8355 8356 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8357 8358 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.CpeDeviceShapeDetail` 8359 :rtype: :class:`~oci.response.Response` 8360 8361 :example: 8362 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_cpe_device_shape.py.html>`__ to see an example of how to use get_cpe_device_shape API. 8363 """ 8364 resource_path = "/cpeDeviceShapes/{cpeDeviceShapeId}" 8365 method = "GET" 8366 8367 # Don't accept unknown kwargs 8368 expected_kwargs = [ 8369 "retry_strategy", 8370 "opc_request_id" 8371 ] 8372 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8373 if extra_kwargs: 8374 raise ValueError( 8375 "get_cpe_device_shape got unknown kwargs: {!r}".format(extra_kwargs)) 8376 8377 path_params = { 8378 "cpeDeviceShapeId": cpe_device_shape_id 8379 } 8380 8381 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8382 8383 for (k, v) in six.iteritems(path_params): 8384 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8385 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8386 8387 header_params = { 8388 "accept": "application/json", 8389 "content-type": "application/json", 8390 "opc-request-id": kwargs.get("opc_request_id", missing) 8391 } 8392 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8393 8394 retry_strategy = self.base_client.get_preferred_retry_strategy( 8395 operation_retry_strategy=kwargs.get('retry_strategy'), 8396 client_retry_strategy=self.retry_strategy 8397 ) 8398 8399 if retry_strategy: 8400 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8401 self.base_client.add_opc_client_retries_header(header_params) 8402 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8403 return retry_strategy.make_retrying_call( 8404 self.base_client.call_api, 8405 resource_path=resource_path, 8406 method=method, 8407 path_params=path_params, 8408 header_params=header_params, 8409 response_type="CpeDeviceShapeDetail") 8410 else: 8411 return self.base_client.call_api( 8412 resource_path=resource_path, 8413 method=method, 8414 path_params=path_params, 8415 header_params=header_params, 8416 response_type="CpeDeviceShapeDetail") 8417 8418 def get_cross_connect(self, cross_connect_id, **kwargs): 8419 """ 8420 Gets the specified cross-connect's information. 8421 8422 8423 :param str cross_connect_id: (required) 8424 The `OCID`__ of the cross-connect. 8425 8426 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 8427 8428 :param obj retry_strategy: (optional) 8429 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8430 8431 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. 8432 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8433 8434 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8435 8436 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.CrossConnect` 8437 :rtype: :class:`~oci.response.Response` 8438 8439 :example: 8440 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_cross_connect.py.html>`__ to see an example of how to use get_cross_connect API. 8441 """ 8442 resource_path = "/crossConnects/{crossConnectId}" 8443 method = "GET" 8444 8445 expected_kwargs = ["retry_strategy"] 8446 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8447 if extra_kwargs: 8448 raise ValueError( 8449 "get_cross_connect got unknown kwargs: {!r}".format(extra_kwargs)) 8450 8451 path_params = { 8452 "crossConnectId": cross_connect_id 8453 } 8454 8455 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8456 8457 for (k, v) in six.iteritems(path_params): 8458 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8459 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8460 8461 header_params = { 8462 "accept": "application/json", 8463 "content-type": "application/json" 8464 } 8465 8466 retry_strategy = self.base_client.get_preferred_retry_strategy( 8467 operation_retry_strategy=kwargs.get('retry_strategy'), 8468 client_retry_strategy=self.retry_strategy 8469 ) 8470 8471 if retry_strategy: 8472 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8473 self.base_client.add_opc_client_retries_header(header_params) 8474 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8475 return retry_strategy.make_retrying_call( 8476 self.base_client.call_api, 8477 resource_path=resource_path, 8478 method=method, 8479 path_params=path_params, 8480 header_params=header_params, 8481 response_type="CrossConnect") 8482 else: 8483 return self.base_client.call_api( 8484 resource_path=resource_path, 8485 method=method, 8486 path_params=path_params, 8487 header_params=header_params, 8488 response_type="CrossConnect") 8489 8490 def get_cross_connect_group(self, cross_connect_group_id, **kwargs): 8491 """ 8492 Gets the specified cross-connect group's information. 8493 8494 8495 :param str cross_connect_group_id: (required) 8496 The `OCID`__ of the cross-connect group. 8497 8498 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 8499 8500 :param obj retry_strategy: (optional) 8501 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8502 8503 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. 8504 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8505 8506 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8507 8508 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.CrossConnectGroup` 8509 :rtype: :class:`~oci.response.Response` 8510 8511 :example: 8512 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_cross_connect_group.py.html>`__ to see an example of how to use get_cross_connect_group API. 8513 """ 8514 resource_path = "/crossConnectGroups/{crossConnectGroupId}" 8515 method = "GET" 8516 8517 expected_kwargs = ["retry_strategy"] 8518 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8519 if extra_kwargs: 8520 raise ValueError( 8521 "get_cross_connect_group got unknown kwargs: {!r}".format(extra_kwargs)) 8522 8523 path_params = { 8524 "crossConnectGroupId": cross_connect_group_id 8525 } 8526 8527 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8528 8529 for (k, v) in six.iteritems(path_params): 8530 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8531 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8532 8533 header_params = { 8534 "accept": "application/json", 8535 "content-type": "application/json" 8536 } 8537 8538 retry_strategy = self.base_client.get_preferred_retry_strategy( 8539 operation_retry_strategy=kwargs.get('retry_strategy'), 8540 client_retry_strategy=self.retry_strategy 8541 ) 8542 8543 if retry_strategy: 8544 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8545 self.base_client.add_opc_client_retries_header(header_params) 8546 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8547 return retry_strategy.make_retrying_call( 8548 self.base_client.call_api, 8549 resource_path=resource_path, 8550 method=method, 8551 path_params=path_params, 8552 header_params=header_params, 8553 response_type="CrossConnectGroup") 8554 else: 8555 return self.base_client.call_api( 8556 resource_path=resource_path, 8557 method=method, 8558 path_params=path_params, 8559 header_params=header_params, 8560 response_type="CrossConnectGroup") 8561 8562 def get_cross_connect_letter_of_authority(self, cross_connect_id, **kwargs): 8563 """ 8564 Gets the Letter of Authority for the specified cross-connect. 8565 8566 8567 :param str cross_connect_id: (required) 8568 The `OCID`__ of the cross-connect. 8569 8570 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 8571 8572 :param obj retry_strategy: (optional) 8573 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8574 8575 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. 8576 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8577 8578 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8579 8580 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.LetterOfAuthority` 8581 :rtype: :class:`~oci.response.Response` 8582 8583 :example: 8584 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_cross_connect_letter_of_authority.py.html>`__ to see an example of how to use get_cross_connect_letter_of_authority API. 8585 """ 8586 resource_path = "/crossConnects/{crossConnectId}/letterOfAuthority" 8587 method = "GET" 8588 8589 expected_kwargs = ["retry_strategy"] 8590 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8591 if extra_kwargs: 8592 raise ValueError( 8593 "get_cross_connect_letter_of_authority got unknown kwargs: {!r}".format(extra_kwargs)) 8594 8595 path_params = { 8596 "crossConnectId": cross_connect_id 8597 } 8598 8599 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8600 8601 for (k, v) in six.iteritems(path_params): 8602 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8603 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8604 8605 header_params = { 8606 "accept": "application/json, text/html", 8607 "content-type": "application/json" 8608 } 8609 8610 retry_strategy = self.base_client.get_preferred_retry_strategy( 8611 operation_retry_strategy=kwargs.get('retry_strategy'), 8612 client_retry_strategy=self.retry_strategy 8613 ) 8614 8615 if retry_strategy: 8616 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8617 self.base_client.add_opc_client_retries_header(header_params) 8618 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8619 return retry_strategy.make_retrying_call( 8620 self.base_client.call_api, 8621 resource_path=resource_path, 8622 method=method, 8623 path_params=path_params, 8624 header_params=header_params, 8625 response_type="LetterOfAuthority") 8626 else: 8627 return self.base_client.call_api( 8628 resource_path=resource_path, 8629 method=method, 8630 path_params=path_params, 8631 header_params=header_params, 8632 response_type="LetterOfAuthority") 8633 8634 def get_cross_connect_status(self, cross_connect_id, **kwargs): 8635 """ 8636 Gets the status of the specified cross-connect. 8637 8638 8639 :param str cross_connect_id: (required) 8640 The `OCID`__ of the cross-connect. 8641 8642 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 8643 8644 :param obj retry_strategy: (optional) 8645 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8646 8647 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. 8648 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8649 8650 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8651 8652 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.CrossConnectStatus` 8653 :rtype: :class:`~oci.response.Response` 8654 8655 :example: 8656 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_cross_connect_status.py.html>`__ to see an example of how to use get_cross_connect_status API. 8657 """ 8658 resource_path = "/crossConnects/{crossConnectId}/status" 8659 method = "GET" 8660 8661 expected_kwargs = ["retry_strategy"] 8662 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8663 if extra_kwargs: 8664 raise ValueError( 8665 "get_cross_connect_status got unknown kwargs: {!r}".format(extra_kwargs)) 8666 8667 path_params = { 8668 "crossConnectId": cross_connect_id 8669 } 8670 8671 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8672 8673 for (k, v) in six.iteritems(path_params): 8674 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8675 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8676 8677 header_params = { 8678 "accept": "application/json", 8679 "content-type": "application/json" 8680 } 8681 8682 retry_strategy = self.base_client.get_preferred_retry_strategy( 8683 operation_retry_strategy=kwargs.get('retry_strategy'), 8684 client_retry_strategy=self.retry_strategy 8685 ) 8686 8687 if retry_strategy: 8688 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8689 self.base_client.add_opc_client_retries_header(header_params) 8690 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8691 return retry_strategy.make_retrying_call( 8692 self.base_client.call_api, 8693 resource_path=resource_path, 8694 method=method, 8695 path_params=path_params, 8696 header_params=header_params, 8697 response_type="CrossConnectStatus") 8698 else: 8699 return self.base_client.call_api( 8700 resource_path=resource_path, 8701 method=method, 8702 path_params=path_params, 8703 header_params=header_params, 8704 response_type="CrossConnectStatus") 8705 8706 def get_dhcp_options(self, dhcp_id, **kwargs): 8707 """ 8708 Gets the specified set of DHCP options. 8709 8710 8711 :param str dhcp_id: (required) 8712 The `OCID`__ for the set of DHCP options. 8713 8714 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 8715 8716 :param obj retry_strategy: (optional) 8717 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8718 8719 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. 8720 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8721 8722 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8723 8724 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DhcpOptions` 8725 :rtype: :class:`~oci.response.Response` 8726 8727 :example: 8728 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_dhcp_options.py.html>`__ to see an example of how to use get_dhcp_options API. 8729 """ 8730 resource_path = "/dhcps/{dhcpId}" 8731 method = "GET" 8732 8733 expected_kwargs = ["retry_strategy"] 8734 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8735 if extra_kwargs: 8736 raise ValueError( 8737 "get_dhcp_options got unknown kwargs: {!r}".format(extra_kwargs)) 8738 8739 path_params = { 8740 "dhcpId": dhcp_id 8741 } 8742 8743 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8744 8745 for (k, v) in six.iteritems(path_params): 8746 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8747 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8748 8749 header_params = { 8750 "accept": "application/json", 8751 "content-type": "application/json" 8752 } 8753 8754 retry_strategy = self.base_client.get_preferred_retry_strategy( 8755 operation_retry_strategy=kwargs.get('retry_strategy'), 8756 client_retry_strategy=self.retry_strategy 8757 ) 8758 8759 if retry_strategy: 8760 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8761 self.base_client.add_opc_client_retries_header(header_params) 8762 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8763 return retry_strategy.make_retrying_call( 8764 self.base_client.call_api, 8765 resource_path=resource_path, 8766 method=method, 8767 path_params=path_params, 8768 header_params=header_params, 8769 response_type="DhcpOptions") 8770 else: 8771 return self.base_client.call_api( 8772 resource_path=resource_path, 8773 method=method, 8774 path_params=path_params, 8775 header_params=header_params, 8776 response_type="DhcpOptions") 8777 8778 def get_drg(self, drg_id, **kwargs): 8779 """ 8780 Gets the specified DRG's information. 8781 8782 8783 :param str drg_id: (required) 8784 The `OCID`__ of the DRG. 8785 8786 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 8787 8788 :param obj retry_strategy: (optional) 8789 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8790 8791 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. 8792 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8793 8794 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8795 8796 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Drg` 8797 :rtype: :class:`~oci.response.Response` 8798 8799 :example: 8800 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_drg.py.html>`__ to see an example of how to use get_drg API. 8801 """ 8802 resource_path = "/drgs/{drgId}" 8803 method = "GET" 8804 8805 expected_kwargs = ["retry_strategy"] 8806 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8807 if extra_kwargs: 8808 raise ValueError( 8809 "get_drg got unknown kwargs: {!r}".format(extra_kwargs)) 8810 8811 path_params = { 8812 "drgId": drg_id 8813 } 8814 8815 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8816 8817 for (k, v) in six.iteritems(path_params): 8818 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8819 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8820 8821 header_params = { 8822 "accept": "application/json", 8823 "content-type": "application/json" 8824 } 8825 8826 retry_strategy = self.base_client.get_preferred_retry_strategy( 8827 operation_retry_strategy=kwargs.get('retry_strategy'), 8828 client_retry_strategy=self.retry_strategy 8829 ) 8830 8831 if retry_strategy: 8832 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8833 self.base_client.add_opc_client_retries_header(header_params) 8834 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8835 return retry_strategy.make_retrying_call( 8836 self.base_client.call_api, 8837 resource_path=resource_path, 8838 method=method, 8839 path_params=path_params, 8840 header_params=header_params, 8841 response_type="Drg") 8842 else: 8843 return self.base_client.call_api( 8844 resource_path=resource_path, 8845 method=method, 8846 path_params=path_params, 8847 header_params=header_params, 8848 response_type="Drg") 8849 8850 def get_drg_attachment(self, drg_attachment_id, **kwargs): 8851 """ 8852 Gets the `DrgAttachment` resource. 8853 8854 8855 :param str drg_attachment_id: (required) 8856 The `OCID`__ of the DRG attachment. 8857 8858 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 8859 8860 :param obj retry_strategy: (optional) 8861 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8862 8863 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. 8864 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8865 8866 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8867 8868 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgAttachment` 8869 :rtype: :class:`~oci.response.Response` 8870 8871 :example: 8872 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_drg_attachment.py.html>`__ to see an example of how to use get_drg_attachment API. 8873 """ 8874 resource_path = "/drgAttachments/{drgAttachmentId}" 8875 method = "GET" 8876 8877 expected_kwargs = ["retry_strategy"] 8878 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8879 if extra_kwargs: 8880 raise ValueError( 8881 "get_drg_attachment got unknown kwargs: {!r}".format(extra_kwargs)) 8882 8883 path_params = { 8884 "drgAttachmentId": drg_attachment_id 8885 } 8886 8887 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8888 8889 for (k, v) in six.iteritems(path_params): 8890 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8891 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8892 8893 header_params = { 8894 "accept": "application/json", 8895 "content-type": "application/json" 8896 } 8897 8898 retry_strategy = self.base_client.get_preferred_retry_strategy( 8899 operation_retry_strategy=kwargs.get('retry_strategy'), 8900 client_retry_strategy=self.retry_strategy 8901 ) 8902 8903 if retry_strategy: 8904 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8905 self.base_client.add_opc_client_retries_header(header_params) 8906 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8907 return retry_strategy.make_retrying_call( 8908 self.base_client.call_api, 8909 resource_path=resource_path, 8910 method=method, 8911 path_params=path_params, 8912 header_params=header_params, 8913 response_type="DrgAttachment") 8914 else: 8915 return self.base_client.call_api( 8916 resource_path=resource_path, 8917 method=method, 8918 path_params=path_params, 8919 header_params=header_params, 8920 response_type="DrgAttachment") 8921 8922 def get_drg_redundancy_status(self, drg_id, **kwargs): 8923 """ 8924 Gets the redundancy status for the specified DRG. For more information, see 8925 `Redundancy Remedies`__. 8926 8927 __ https://docs.cloud.oracle.com/iaas/Content/Network/Troubleshoot/drgredundancy.htm 8928 8929 8930 :param str drg_id: (required) 8931 The `OCID`__ of the DRG. 8932 8933 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 8934 8935 :param str opc_request_id: (optional) 8936 Unique identifier for the request. 8937 If you need to contact Oracle about a particular request, please provide the request ID. 8938 8939 :param obj retry_strategy: (optional) 8940 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8941 8942 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. 8943 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8944 8945 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8946 8947 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgRedundancyStatus` 8948 :rtype: :class:`~oci.response.Response` 8949 8950 :example: 8951 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_drg_redundancy_status.py.html>`__ to see an example of how to use get_drg_redundancy_status API. 8952 """ 8953 resource_path = "/drgs/{drgId}/redundancyStatus" 8954 method = "GET" 8955 8956 # Don't accept unknown kwargs 8957 expected_kwargs = [ 8958 "retry_strategy", 8959 "opc_request_id" 8960 ] 8961 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8962 if extra_kwargs: 8963 raise ValueError( 8964 "get_drg_redundancy_status got unknown kwargs: {!r}".format(extra_kwargs)) 8965 8966 path_params = { 8967 "drgId": drg_id 8968 } 8969 8970 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8971 8972 for (k, v) in six.iteritems(path_params): 8973 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8974 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8975 8976 header_params = { 8977 "accept": "application/json", 8978 "content-type": "application/json", 8979 "opc-request-id": kwargs.get("opc_request_id", missing) 8980 } 8981 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8982 8983 retry_strategy = self.base_client.get_preferred_retry_strategy( 8984 operation_retry_strategy=kwargs.get('retry_strategy'), 8985 client_retry_strategy=self.retry_strategy 8986 ) 8987 8988 if retry_strategy: 8989 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8990 self.base_client.add_opc_client_retries_header(header_params) 8991 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8992 return retry_strategy.make_retrying_call( 8993 self.base_client.call_api, 8994 resource_path=resource_path, 8995 method=method, 8996 path_params=path_params, 8997 header_params=header_params, 8998 response_type="DrgRedundancyStatus") 8999 else: 9000 return self.base_client.call_api( 9001 resource_path=resource_path, 9002 method=method, 9003 path_params=path_params, 9004 header_params=header_params, 9005 response_type="DrgRedundancyStatus") 9006 9007 def get_drg_route_distribution(self, drg_route_distribution_id, **kwargs): 9008 """ 9009 Gets the specified route distribution's information. 9010 9011 9012 :param str drg_route_distribution_id: (required) 9013 The `OCID`__ of the route distribution. 9014 9015 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 9016 9017 :param obj retry_strategy: (optional) 9018 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9019 9020 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. 9021 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9022 9023 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9024 9025 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgRouteDistribution` 9026 :rtype: :class:`~oci.response.Response` 9027 9028 :example: 9029 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_drg_route_distribution.py.html>`__ to see an example of how to use get_drg_route_distribution API. 9030 """ 9031 resource_path = "/drgRouteDistributions/{drgRouteDistributionId}" 9032 method = "GET" 9033 9034 expected_kwargs = ["retry_strategy"] 9035 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9036 if extra_kwargs: 9037 raise ValueError( 9038 "get_drg_route_distribution got unknown kwargs: {!r}".format(extra_kwargs)) 9039 9040 path_params = { 9041 "drgRouteDistributionId": drg_route_distribution_id 9042 } 9043 9044 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9045 9046 for (k, v) in six.iteritems(path_params): 9047 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9048 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9049 9050 header_params = { 9051 "accept": "application/json", 9052 "content-type": "application/json" 9053 } 9054 9055 retry_strategy = self.base_client.get_preferred_retry_strategy( 9056 operation_retry_strategy=kwargs.get('retry_strategy'), 9057 client_retry_strategy=self.retry_strategy 9058 ) 9059 9060 if retry_strategy: 9061 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9062 self.base_client.add_opc_client_retries_header(header_params) 9063 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9064 return retry_strategy.make_retrying_call( 9065 self.base_client.call_api, 9066 resource_path=resource_path, 9067 method=method, 9068 path_params=path_params, 9069 header_params=header_params, 9070 response_type="DrgRouteDistribution") 9071 else: 9072 return self.base_client.call_api( 9073 resource_path=resource_path, 9074 method=method, 9075 path_params=path_params, 9076 header_params=header_params, 9077 response_type="DrgRouteDistribution") 9078 9079 def get_drg_route_table(self, drg_route_table_id, **kwargs): 9080 """ 9081 Gets the specified DRG route table's information. 9082 9083 9084 :param str drg_route_table_id: (required) 9085 The `OCID`__ of the DRG route table. 9086 9087 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 9088 9089 :param obj retry_strategy: (optional) 9090 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9091 9092 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. 9093 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9094 9095 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9096 9097 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgRouteTable` 9098 :rtype: :class:`~oci.response.Response` 9099 9100 :example: 9101 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_drg_route_table.py.html>`__ to see an example of how to use get_drg_route_table API. 9102 """ 9103 resource_path = "/drgRouteTables/{drgRouteTableId}" 9104 method = "GET" 9105 9106 expected_kwargs = ["retry_strategy"] 9107 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9108 if extra_kwargs: 9109 raise ValueError( 9110 "get_drg_route_table got unknown kwargs: {!r}".format(extra_kwargs)) 9111 9112 path_params = { 9113 "drgRouteTableId": drg_route_table_id 9114 } 9115 9116 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9117 9118 for (k, v) in six.iteritems(path_params): 9119 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9120 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9121 9122 header_params = { 9123 "accept": "application/json", 9124 "content-type": "application/json" 9125 } 9126 9127 retry_strategy = self.base_client.get_preferred_retry_strategy( 9128 operation_retry_strategy=kwargs.get('retry_strategy'), 9129 client_retry_strategy=self.retry_strategy 9130 ) 9131 9132 if retry_strategy: 9133 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9134 self.base_client.add_opc_client_retries_header(header_params) 9135 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9136 return retry_strategy.make_retrying_call( 9137 self.base_client.call_api, 9138 resource_path=resource_path, 9139 method=method, 9140 path_params=path_params, 9141 header_params=header_params, 9142 response_type="DrgRouteTable") 9143 else: 9144 return self.base_client.call_api( 9145 resource_path=resource_path, 9146 method=method, 9147 path_params=path_params, 9148 header_params=header_params, 9149 response_type="DrgRouteTable") 9150 9151 def get_fast_connect_provider_service(self, provider_service_id, **kwargs): 9152 """ 9153 Gets the specified provider service. 9154 For more information, see `FastConnect Overview`__. 9155 9156 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm 9157 9158 9159 :param str provider_service_id: (required) 9160 The `OCID`__ of the provider service. 9161 9162 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9163 9164 :param obj retry_strategy: (optional) 9165 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9166 9167 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. 9168 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9169 9170 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9171 9172 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.FastConnectProviderService` 9173 :rtype: :class:`~oci.response.Response` 9174 9175 :example: 9176 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_fast_connect_provider_service.py.html>`__ to see an example of how to use get_fast_connect_provider_service API. 9177 """ 9178 resource_path = "/fastConnectProviderServices/{providerServiceId}" 9179 method = "GET" 9180 9181 expected_kwargs = ["retry_strategy"] 9182 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9183 if extra_kwargs: 9184 raise ValueError( 9185 "get_fast_connect_provider_service got unknown kwargs: {!r}".format(extra_kwargs)) 9186 9187 path_params = { 9188 "providerServiceId": provider_service_id 9189 } 9190 9191 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9192 9193 for (k, v) in six.iteritems(path_params): 9194 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9195 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9196 9197 header_params = { 9198 "accept": "application/json", 9199 "content-type": "application/json" 9200 } 9201 9202 retry_strategy = self.base_client.get_preferred_retry_strategy( 9203 operation_retry_strategy=kwargs.get('retry_strategy'), 9204 client_retry_strategy=self.retry_strategy 9205 ) 9206 9207 if retry_strategy: 9208 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9209 self.base_client.add_opc_client_retries_header(header_params) 9210 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9211 return retry_strategy.make_retrying_call( 9212 self.base_client.call_api, 9213 resource_path=resource_path, 9214 method=method, 9215 path_params=path_params, 9216 header_params=header_params, 9217 response_type="FastConnectProviderService") 9218 else: 9219 return self.base_client.call_api( 9220 resource_path=resource_path, 9221 method=method, 9222 path_params=path_params, 9223 header_params=header_params, 9224 response_type="FastConnectProviderService") 9225 9226 def get_fast_connect_provider_service_key(self, provider_service_id, provider_service_key_name, **kwargs): 9227 """ 9228 Gets the specified provider service key's information. Use this operation to validate a 9229 provider service key. An invalid key returns a 404 error. 9230 9231 9232 :param str provider_service_id: (required) 9233 The `OCID`__ of the provider service. 9234 9235 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9236 9237 :param str provider_service_key_name: (required) 9238 The provider service key that the provider gives you when you set up a virtual circuit connection 9239 from the provider to Oracle Cloud Infrastructure. You can set up that connection and get your 9240 provider service key at the provider's website or portal. For the portal location, see the `description` 9241 attribute of the :class:`FastConnectProviderService`. 9242 9243 :param obj retry_strategy: (optional) 9244 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9245 9246 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. 9247 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9248 9249 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9250 9251 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.FastConnectProviderServiceKey` 9252 :rtype: :class:`~oci.response.Response` 9253 9254 :example: 9255 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_fast_connect_provider_service_key.py.html>`__ to see an example of how to use get_fast_connect_provider_service_key API. 9256 """ 9257 resource_path = "/fastConnectProviderServices/{providerServiceId}/providerServiceKeys/{providerServiceKeyName}" 9258 method = "GET" 9259 9260 expected_kwargs = ["retry_strategy"] 9261 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9262 if extra_kwargs: 9263 raise ValueError( 9264 "get_fast_connect_provider_service_key got unknown kwargs: {!r}".format(extra_kwargs)) 9265 9266 path_params = { 9267 "providerServiceId": provider_service_id, 9268 "providerServiceKeyName": provider_service_key_name 9269 } 9270 9271 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9272 9273 for (k, v) in six.iteritems(path_params): 9274 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9275 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9276 9277 header_params = { 9278 "accept": "application/json", 9279 "content-type": "application/json" 9280 } 9281 9282 retry_strategy = self.base_client.get_preferred_retry_strategy( 9283 operation_retry_strategy=kwargs.get('retry_strategy'), 9284 client_retry_strategy=self.retry_strategy 9285 ) 9286 9287 if retry_strategy: 9288 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9289 self.base_client.add_opc_client_retries_header(header_params) 9290 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9291 return retry_strategy.make_retrying_call( 9292 self.base_client.call_api, 9293 resource_path=resource_path, 9294 method=method, 9295 path_params=path_params, 9296 header_params=header_params, 9297 response_type="FastConnectProviderServiceKey") 9298 else: 9299 return self.base_client.call_api( 9300 resource_path=resource_path, 9301 method=method, 9302 path_params=path_params, 9303 header_params=header_params, 9304 response_type="FastConnectProviderServiceKey") 9305 9306 def get_internet_gateway(self, ig_id, **kwargs): 9307 """ 9308 Gets the specified internet gateway's information. 9309 9310 9311 :param str ig_id: (required) 9312 The `OCID`__ of the internet gateway. 9313 9314 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9315 9316 :param obj retry_strategy: (optional) 9317 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9318 9319 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. 9320 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9321 9322 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9323 9324 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.InternetGateway` 9325 :rtype: :class:`~oci.response.Response` 9326 9327 :example: 9328 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_internet_gateway.py.html>`__ to see an example of how to use get_internet_gateway API. 9329 """ 9330 resource_path = "/internetGateways/{igId}" 9331 method = "GET" 9332 9333 expected_kwargs = ["retry_strategy"] 9334 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9335 if extra_kwargs: 9336 raise ValueError( 9337 "get_internet_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 9338 9339 path_params = { 9340 "igId": ig_id 9341 } 9342 9343 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9344 9345 for (k, v) in six.iteritems(path_params): 9346 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9347 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9348 9349 header_params = { 9350 "accept": "application/json", 9351 "content-type": "application/json" 9352 } 9353 9354 retry_strategy = self.base_client.get_preferred_retry_strategy( 9355 operation_retry_strategy=kwargs.get('retry_strategy'), 9356 client_retry_strategy=self.retry_strategy 9357 ) 9358 9359 if retry_strategy: 9360 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9361 self.base_client.add_opc_client_retries_header(header_params) 9362 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9363 return retry_strategy.make_retrying_call( 9364 self.base_client.call_api, 9365 resource_path=resource_path, 9366 method=method, 9367 path_params=path_params, 9368 header_params=header_params, 9369 response_type="InternetGateway") 9370 else: 9371 return self.base_client.call_api( 9372 resource_path=resource_path, 9373 method=method, 9374 path_params=path_params, 9375 header_params=header_params, 9376 response_type="InternetGateway") 9377 9378 def get_ip_sec_connection(self, ipsc_id, **kwargs): 9379 """ 9380 Gets the specified IPSec connection's basic information, including the static routes for the 9381 on-premises router. If you want the status of the connection (whether it's up or down), use 9382 :func:`get_ip_sec_connection_tunnel`. 9383 9384 9385 :param str ipsc_id: (required) 9386 The `OCID`__ of the IPSec connection. 9387 9388 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9389 9390 :param obj retry_strategy: (optional) 9391 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9392 9393 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. 9394 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9395 9396 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9397 9398 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnection` 9399 :rtype: :class:`~oci.response.Response` 9400 9401 :example: 9402 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_ip_sec_connection.py.html>`__ to see an example of how to use get_ip_sec_connection API. 9403 """ 9404 resource_path = "/ipsecConnections/{ipscId}" 9405 method = "GET" 9406 9407 expected_kwargs = ["retry_strategy"] 9408 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9409 if extra_kwargs: 9410 raise ValueError( 9411 "get_ip_sec_connection got unknown kwargs: {!r}".format(extra_kwargs)) 9412 9413 path_params = { 9414 "ipscId": ipsc_id 9415 } 9416 9417 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9418 9419 for (k, v) in six.iteritems(path_params): 9420 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9421 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9422 9423 header_params = { 9424 "accept": "application/json", 9425 "content-type": "application/json" 9426 } 9427 9428 retry_strategy = self.base_client.get_preferred_retry_strategy( 9429 operation_retry_strategy=kwargs.get('retry_strategy'), 9430 client_retry_strategy=self.retry_strategy 9431 ) 9432 9433 if retry_strategy: 9434 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9435 self.base_client.add_opc_client_retries_header(header_params) 9436 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9437 return retry_strategy.make_retrying_call( 9438 self.base_client.call_api, 9439 resource_path=resource_path, 9440 method=method, 9441 path_params=path_params, 9442 header_params=header_params, 9443 response_type="IPSecConnection") 9444 else: 9445 return self.base_client.call_api( 9446 resource_path=resource_path, 9447 method=method, 9448 path_params=path_params, 9449 header_params=header_params, 9450 response_type="IPSecConnection") 9451 9452 def get_ip_sec_connection_device_config(self, ipsc_id, **kwargs): 9453 """ 9454 Deprecated. To get tunnel information, instead use: 9455 9456 * :func:`get_ip_sec_connection_tunnel` 9457 * :func:`get_ip_sec_connection_tunnel_shared_secret` 9458 9459 9460 :param str ipsc_id: (required) 9461 The `OCID`__ of the IPSec connection. 9462 9463 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9464 9465 :param obj retry_strategy: (optional) 9466 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9467 9468 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. 9469 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9470 9471 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9472 9473 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnectionDeviceConfig` 9474 :rtype: :class:`~oci.response.Response` 9475 9476 :example: 9477 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_ip_sec_connection_device_config.py.html>`__ to see an example of how to use get_ip_sec_connection_device_config API. 9478 """ 9479 resource_path = "/ipsecConnections/{ipscId}/deviceConfig" 9480 method = "GET" 9481 9482 expected_kwargs = ["retry_strategy"] 9483 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9484 if extra_kwargs: 9485 raise ValueError( 9486 "get_ip_sec_connection_device_config got unknown kwargs: {!r}".format(extra_kwargs)) 9487 9488 path_params = { 9489 "ipscId": ipsc_id 9490 } 9491 9492 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9493 9494 for (k, v) in six.iteritems(path_params): 9495 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9496 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9497 9498 header_params = { 9499 "accept": "application/json", 9500 "content-type": "application/json" 9501 } 9502 9503 retry_strategy = self.base_client.get_preferred_retry_strategy( 9504 operation_retry_strategy=kwargs.get('retry_strategy'), 9505 client_retry_strategy=self.retry_strategy 9506 ) 9507 9508 if retry_strategy: 9509 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9510 self.base_client.add_opc_client_retries_header(header_params) 9511 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9512 return retry_strategy.make_retrying_call( 9513 self.base_client.call_api, 9514 resource_path=resource_path, 9515 method=method, 9516 path_params=path_params, 9517 header_params=header_params, 9518 response_type="IPSecConnectionDeviceConfig") 9519 else: 9520 return self.base_client.call_api( 9521 resource_path=resource_path, 9522 method=method, 9523 path_params=path_params, 9524 header_params=header_params, 9525 response_type="IPSecConnectionDeviceConfig") 9526 9527 def get_ip_sec_connection_device_status(self, ipsc_id, **kwargs): 9528 """ 9529 Deprecated. To get the tunnel status, instead use 9530 :func:`get_ip_sec_connection_tunnel`. 9531 9532 9533 :param str ipsc_id: (required) 9534 The `OCID`__ of the IPSec connection. 9535 9536 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9537 9538 :param obj retry_strategy: (optional) 9539 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9540 9541 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. 9542 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9543 9544 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9545 9546 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnectionDeviceStatus` 9547 :rtype: :class:`~oci.response.Response` 9548 9549 :example: 9550 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_ip_sec_connection_device_status.py.html>`__ to see an example of how to use get_ip_sec_connection_device_status API. 9551 """ 9552 resource_path = "/ipsecConnections/{ipscId}/deviceStatus" 9553 method = "GET" 9554 9555 expected_kwargs = ["retry_strategy"] 9556 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9557 if extra_kwargs: 9558 raise ValueError( 9559 "get_ip_sec_connection_device_status got unknown kwargs: {!r}".format(extra_kwargs)) 9560 9561 path_params = { 9562 "ipscId": ipsc_id 9563 } 9564 9565 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9566 9567 for (k, v) in six.iteritems(path_params): 9568 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9569 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9570 9571 header_params = { 9572 "accept": "application/json", 9573 "content-type": "application/json" 9574 } 9575 9576 retry_strategy = self.base_client.get_preferred_retry_strategy( 9577 operation_retry_strategy=kwargs.get('retry_strategy'), 9578 client_retry_strategy=self.retry_strategy 9579 ) 9580 9581 if retry_strategy: 9582 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9583 self.base_client.add_opc_client_retries_header(header_params) 9584 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9585 return retry_strategy.make_retrying_call( 9586 self.base_client.call_api, 9587 resource_path=resource_path, 9588 method=method, 9589 path_params=path_params, 9590 header_params=header_params, 9591 response_type="IPSecConnectionDeviceStatus") 9592 else: 9593 return self.base_client.call_api( 9594 resource_path=resource_path, 9595 method=method, 9596 path_params=path_params, 9597 header_params=header_params, 9598 response_type="IPSecConnectionDeviceStatus") 9599 9600 def get_ip_sec_connection_tunnel(self, ipsc_id, tunnel_id, **kwargs): 9601 """ 9602 Gets the specified tunnel's information. The resulting object does not include the tunnel's 9603 shared secret (pre-shared key). To retrieve that, use 9604 :func:`get_ip_sec_connection_tunnel_shared_secret`. 9605 9606 9607 :param str ipsc_id: (required) 9608 The `OCID`__ of the IPSec connection. 9609 9610 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9611 9612 :param str tunnel_id: (required) 9613 The `OCID`__ of the tunnel. 9614 9615 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 9616 9617 :param obj retry_strategy: (optional) 9618 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9619 9620 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. 9621 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9622 9623 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9624 9625 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnectionTunnel` 9626 :rtype: :class:`~oci.response.Response` 9627 9628 :example: 9629 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_ip_sec_connection_tunnel.py.html>`__ to see an example of how to use get_ip_sec_connection_tunnel API. 9630 """ 9631 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}" 9632 method = "GET" 9633 9634 expected_kwargs = ["retry_strategy"] 9635 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9636 if extra_kwargs: 9637 raise ValueError( 9638 "get_ip_sec_connection_tunnel got unknown kwargs: {!r}".format(extra_kwargs)) 9639 9640 path_params = { 9641 "ipscId": ipsc_id, 9642 "tunnelId": tunnel_id 9643 } 9644 9645 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9646 9647 for (k, v) in six.iteritems(path_params): 9648 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9649 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9650 9651 header_params = { 9652 "accept": "application/json", 9653 "content-type": "application/json" 9654 } 9655 9656 retry_strategy = self.base_client.get_preferred_retry_strategy( 9657 operation_retry_strategy=kwargs.get('retry_strategy'), 9658 client_retry_strategy=self.retry_strategy 9659 ) 9660 9661 if retry_strategy: 9662 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9663 self.base_client.add_opc_client_retries_header(header_params) 9664 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9665 return retry_strategy.make_retrying_call( 9666 self.base_client.call_api, 9667 resource_path=resource_path, 9668 method=method, 9669 path_params=path_params, 9670 header_params=header_params, 9671 response_type="IPSecConnectionTunnel") 9672 else: 9673 return self.base_client.call_api( 9674 resource_path=resource_path, 9675 method=method, 9676 path_params=path_params, 9677 header_params=header_params, 9678 response_type="IPSecConnectionTunnel") 9679 9680 def get_ip_sec_connection_tunnel_error(self, ipsc_id, tunnel_id, **kwargs): 9681 """ 9682 Get the identified error for the specified IPSec Tunnel ID. 9683 9684 9685 :param str ipsc_id: (required) 9686 The `OCID`__ of the IPSec connection. 9687 9688 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9689 9690 :param str tunnel_id: (required) 9691 The `OCID`__ of the tunnel. 9692 9693 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 9694 9695 :param obj retry_strategy: (optional) 9696 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9697 9698 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. 9699 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9700 9701 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9702 9703 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnectionTunnelErrorDetails` 9704 :rtype: :class:`~oci.response.Response` 9705 9706 :example: 9707 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_ip_sec_connection_tunnel_error.py.html>`__ to see an example of how to use get_ip_sec_connection_tunnel_error API. 9708 """ 9709 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/error" 9710 method = "GET" 9711 9712 expected_kwargs = ["retry_strategy"] 9713 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9714 if extra_kwargs: 9715 raise ValueError( 9716 "get_ip_sec_connection_tunnel_error got unknown kwargs: {!r}".format(extra_kwargs)) 9717 9718 path_params = { 9719 "ipscId": ipsc_id, 9720 "tunnelId": tunnel_id 9721 } 9722 9723 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9724 9725 for (k, v) in six.iteritems(path_params): 9726 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9727 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9728 9729 header_params = { 9730 "accept": "application/json", 9731 "content-type": "application/json" 9732 } 9733 9734 retry_strategy = self.base_client.get_preferred_retry_strategy( 9735 operation_retry_strategy=kwargs.get('retry_strategy'), 9736 client_retry_strategy=self.retry_strategy 9737 ) 9738 9739 if retry_strategy: 9740 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9741 self.base_client.add_opc_client_retries_header(header_params) 9742 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9743 return retry_strategy.make_retrying_call( 9744 self.base_client.call_api, 9745 resource_path=resource_path, 9746 method=method, 9747 path_params=path_params, 9748 header_params=header_params, 9749 response_type="IPSecConnectionTunnelErrorDetails") 9750 else: 9751 return self.base_client.call_api( 9752 resource_path=resource_path, 9753 method=method, 9754 path_params=path_params, 9755 header_params=header_params, 9756 response_type="IPSecConnectionTunnelErrorDetails") 9757 9758 def get_ip_sec_connection_tunnel_shared_secret(self, ipsc_id, tunnel_id, **kwargs): 9759 """ 9760 Gets the specified tunnel's shared secret (pre-shared key). To get other information 9761 about the tunnel, use :func:`get_ip_sec_connection_tunnel`. 9762 9763 9764 :param str ipsc_id: (required) 9765 The `OCID`__ of the IPSec connection. 9766 9767 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9768 9769 :param str tunnel_id: (required) 9770 The `OCID`__ of the tunnel. 9771 9772 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 9773 9774 :param obj retry_strategy: (optional) 9775 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9776 9777 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. 9778 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9779 9780 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9781 9782 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnectionTunnelSharedSecret` 9783 :rtype: :class:`~oci.response.Response` 9784 9785 :example: 9786 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_ip_sec_connection_tunnel_shared_secret.py.html>`__ to see an example of how to use get_ip_sec_connection_tunnel_shared_secret API. 9787 """ 9788 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/sharedSecret" 9789 method = "GET" 9790 9791 expected_kwargs = ["retry_strategy"] 9792 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9793 if extra_kwargs: 9794 raise ValueError( 9795 "get_ip_sec_connection_tunnel_shared_secret got unknown kwargs: {!r}".format(extra_kwargs)) 9796 9797 path_params = { 9798 "ipscId": ipsc_id, 9799 "tunnelId": tunnel_id 9800 } 9801 9802 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9803 9804 for (k, v) in six.iteritems(path_params): 9805 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9806 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9807 9808 header_params = { 9809 "accept": "application/json", 9810 "content-type": "application/json" 9811 } 9812 9813 retry_strategy = self.base_client.get_preferred_retry_strategy( 9814 operation_retry_strategy=kwargs.get('retry_strategy'), 9815 client_retry_strategy=self.retry_strategy 9816 ) 9817 9818 if retry_strategy: 9819 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9820 self.base_client.add_opc_client_retries_header(header_params) 9821 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9822 return retry_strategy.make_retrying_call( 9823 self.base_client.call_api, 9824 resource_path=resource_path, 9825 method=method, 9826 path_params=path_params, 9827 header_params=header_params, 9828 response_type="IPSecConnectionTunnelSharedSecret") 9829 else: 9830 return self.base_client.call_api( 9831 resource_path=resource_path, 9832 method=method, 9833 path_params=path_params, 9834 header_params=header_params, 9835 response_type="IPSecConnectionTunnelSharedSecret") 9836 9837 def get_ipsec_cpe_device_config_content(self, ipsc_id, **kwargs): 9838 """ 9839 Renders a set of CPE configuration content for the specified IPSec connection (for all the 9840 tunnels in the connection). The content helps a network engineer configure the actual CPE 9841 device (for example, a hardware router) that the specified IPSec connection terminates on. 9842 9843 The rendered content is specific to the type of CPE device (for example, Cisco ASA). Therefore the 9844 :class:`Cpe` used by the specified :class:`IPSecConnection` 9845 must have the CPE's device type specified by the `cpeDeviceShapeId` attribute. The content 9846 optionally includes answers that the customer provides (see 9847 :func:`update_tunnel_cpe_device_config`), 9848 merged with a template of other information specific to the CPE device type. 9849 9850 The operation returns configuration information for all tunnels in the single specified 9851 :class:`IPSecConnection` object. Here are other similar 9852 operations: 9853 9854 * :func:`get_tunnel_cpe_device_config_content` 9855 returns CPE configuration content for a specific tunnel within an IPSec connection. 9856 * :func:`get_cpe_device_config_content` 9857 returns CPE configuration content for *all* IPSec connections that use a specific CPE. 9858 9859 9860 :param str ipsc_id: (required) 9861 The `OCID`__ of the IPSec connection. 9862 9863 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9864 9865 :param str opc_request_id: (optional) 9866 Unique identifier for the request. 9867 If you need to contact Oracle about a particular request, please provide the request ID. 9868 9869 :param obj retry_strategy: (optional) 9870 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9871 9872 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. 9873 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9874 9875 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9876 9877 :return: A :class:`~oci.response.Response` object with data of type stream 9878 :rtype: :class:`~oci.response.Response` 9879 9880 :example: 9881 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_ipsec_cpe_device_config_content.py.html>`__ to see an example of how to use get_ipsec_cpe_device_config_content API. 9882 """ 9883 resource_path = "/ipsecConnections/{ipscId}/cpeConfigContent" 9884 method = "GET" 9885 9886 # Don't accept unknown kwargs 9887 expected_kwargs = [ 9888 "retry_strategy", 9889 "opc_request_id" 9890 ] 9891 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9892 if extra_kwargs: 9893 raise ValueError( 9894 "get_ipsec_cpe_device_config_content got unknown kwargs: {!r}".format(extra_kwargs)) 9895 9896 path_params = { 9897 "ipscId": ipsc_id 9898 } 9899 9900 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9901 9902 for (k, v) in six.iteritems(path_params): 9903 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9904 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9905 9906 header_params = { 9907 "accept": "text/plain; charset=utf-8", 9908 "content-type": "application/json", 9909 "opc-request-id": kwargs.get("opc_request_id", missing) 9910 } 9911 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 9912 9913 retry_strategy = self.base_client.get_preferred_retry_strategy( 9914 operation_retry_strategy=kwargs.get('retry_strategy'), 9915 client_retry_strategy=self.retry_strategy 9916 ) 9917 9918 if retry_strategy: 9919 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9920 self.base_client.add_opc_client_retries_header(header_params) 9921 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9922 return retry_strategy.make_retrying_call( 9923 self.base_client.call_api, 9924 resource_path=resource_path, 9925 method=method, 9926 path_params=path_params, 9927 header_params=header_params, 9928 response_type="stream") 9929 else: 9930 return self.base_client.call_api( 9931 resource_path=resource_path, 9932 method=method, 9933 path_params=path_params, 9934 header_params=header_params, 9935 response_type="stream") 9936 9937 def get_ipv6(self, ipv6_id, **kwargs): 9938 """ 9939 Gets the specified IPv6. You must specify the object's `OCID`__. 9940 Alternatively, you can get the object by using 9941 :func:`list_ipv6s` 9942 with the IPv6 address (for example, 2001:0db8:0123:1111:98fe:dcba:9876:4321) and subnet `OCID`__. 9943 9944 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 9945 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 9946 9947 9948 :param str ipv6_id: (required) 9949 The `OCID`__ of the IPv6. 9950 9951 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 9952 9953 :param str opc_request_id: (optional) 9954 Unique identifier for the request. 9955 If you need to contact Oracle about a particular request, please provide the request ID. 9956 9957 :param obj retry_strategy: (optional) 9958 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9959 9960 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. 9961 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9962 9963 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9964 9965 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Ipv6` 9966 :rtype: :class:`~oci.response.Response` 9967 9968 :example: 9969 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_ipv6.py.html>`__ to see an example of how to use get_ipv6 API. 9970 """ 9971 resource_path = "/ipv6/{ipv6Id}" 9972 method = "GET" 9973 9974 # Don't accept unknown kwargs 9975 expected_kwargs = [ 9976 "retry_strategy", 9977 "opc_request_id" 9978 ] 9979 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9980 if extra_kwargs: 9981 raise ValueError( 9982 "get_ipv6 got unknown kwargs: {!r}".format(extra_kwargs)) 9983 9984 path_params = { 9985 "ipv6Id": ipv6_id 9986 } 9987 9988 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9989 9990 for (k, v) in six.iteritems(path_params): 9991 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9992 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9993 9994 header_params = { 9995 "accept": "application/json", 9996 "content-type": "application/json", 9997 "opc-request-id": kwargs.get("opc_request_id", missing) 9998 } 9999 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 10000 10001 retry_strategy = self.base_client.get_preferred_retry_strategy( 10002 operation_retry_strategy=kwargs.get('retry_strategy'), 10003 client_retry_strategy=self.retry_strategy 10004 ) 10005 10006 if retry_strategy: 10007 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10008 self.base_client.add_opc_client_retries_header(header_params) 10009 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10010 return retry_strategy.make_retrying_call( 10011 self.base_client.call_api, 10012 resource_path=resource_path, 10013 method=method, 10014 path_params=path_params, 10015 header_params=header_params, 10016 response_type="Ipv6") 10017 else: 10018 return self.base_client.call_api( 10019 resource_path=resource_path, 10020 method=method, 10021 path_params=path_params, 10022 header_params=header_params, 10023 response_type="Ipv6") 10024 10025 def get_local_peering_gateway(self, local_peering_gateway_id, **kwargs): 10026 """ 10027 Gets the specified local peering gateway's information. 10028 10029 10030 :param str local_peering_gateway_id: (required) 10031 The `OCID`__ of the local peering gateway. 10032 10033 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 10034 10035 :param obj retry_strategy: (optional) 10036 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10037 10038 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. 10039 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10040 10041 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10042 10043 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.LocalPeeringGateway` 10044 :rtype: :class:`~oci.response.Response` 10045 10046 :example: 10047 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_local_peering_gateway.py.html>`__ to see an example of how to use get_local_peering_gateway API. 10048 """ 10049 resource_path = "/localPeeringGateways/{localPeeringGatewayId}" 10050 method = "GET" 10051 10052 expected_kwargs = ["retry_strategy"] 10053 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10054 if extra_kwargs: 10055 raise ValueError( 10056 "get_local_peering_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 10057 10058 path_params = { 10059 "localPeeringGatewayId": local_peering_gateway_id 10060 } 10061 10062 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10063 10064 for (k, v) in six.iteritems(path_params): 10065 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10066 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10067 10068 header_params = { 10069 "accept": "application/json", 10070 "content-type": "application/json" 10071 } 10072 10073 retry_strategy = self.base_client.get_preferred_retry_strategy( 10074 operation_retry_strategy=kwargs.get('retry_strategy'), 10075 client_retry_strategy=self.retry_strategy 10076 ) 10077 10078 if retry_strategy: 10079 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10080 self.base_client.add_opc_client_retries_header(header_params) 10081 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10082 return retry_strategy.make_retrying_call( 10083 self.base_client.call_api, 10084 resource_path=resource_path, 10085 method=method, 10086 path_params=path_params, 10087 header_params=header_params, 10088 response_type="LocalPeeringGateway") 10089 else: 10090 return self.base_client.call_api( 10091 resource_path=resource_path, 10092 method=method, 10093 path_params=path_params, 10094 header_params=header_params, 10095 response_type="LocalPeeringGateway") 10096 10097 def get_nat_gateway(self, nat_gateway_id, **kwargs): 10098 """ 10099 Gets the specified NAT gateway's information. 10100 10101 10102 :param str nat_gateway_id: (required) 10103 The NAT gateway's `OCID`__. 10104 10105 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10106 10107 :param obj retry_strategy: (optional) 10108 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10109 10110 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. 10111 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10112 10113 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10114 10115 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.NatGateway` 10116 :rtype: :class:`~oci.response.Response` 10117 10118 :example: 10119 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_nat_gateway.py.html>`__ to see an example of how to use get_nat_gateway API. 10120 """ 10121 resource_path = "/natGateways/{natGatewayId}" 10122 method = "GET" 10123 10124 expected_kwargs = ["retry_strategy"] 10125 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10126 if extra_kwargs: 10127 raise ValueError( 10128 "get_nat_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 10129 10130 path_params = { 10131 "natGatewayId": nat_gateway_id 10132 } 10133 10134 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10135 10136 for (k, v) in six.iteritems(path_params): 10137 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10138 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10139 10140 header_params = { 10141 "accept": "application/json", 10142 "content-type": "application/json" 10143 } 10144 10145 retry_strategy = self.base_client.get_preferred_retry_strategy( 10146 operation_retry_strategy=kwargs.get('retry_strategy'), 10147 client_retry_strategy=self.retry_strategy 10148 ) 10149 10150 if retry_strategy: 10151 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10152 self.base_client.add_opc_client_retries_header(header_params) 10153 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10154 return retry_strategy.make_retrying_call( 10155 self.base_client.call_api, 10156 resource_path=resource_path, 10157 method=method, 10158 path_params=path_params, 10159 header_params=header_params, 10160 response_type="NatGateway") 10161 else: 10162 return self.base_client.call_api( 10163 resource_path=resource_path, 10164 method=method, 10165 path_params=path_params, 10166 header_params=header_params, 10167 response_type="NatGateway") 10168 10169 def get_network_security_group(self, network_security_group_id, **kwargs): 10170 """ 10171 Gets the specified network security group's information. 10172 10173 To list the VNICs in an NSG, see 10174 :func:`list_network_security_group_vnics`. 10175 10176 To list the security rules in an NSG, see 10177 :func:`list_network_security_group_security_rules`. 10178 10179 10180 :param str network_security_group_id: (required) 10181 The `OCID`__ of the network security group. 10182 10183 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10184 10185 :param obj retry_strategy: (optional) 10186 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10187 10188 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. 10189 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10190 10191 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10192 10193 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.NetworkSecurityGroup` 10194 :rtype: :class:`~oci.response.Response` 10195 10196 :example: 10197 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_network_security_group.py.html>`__ to see an example of how to use get_network_security_group API. 10198 """ 10199 resource_path = "/networkSecurityGroups/{networkSecurityGroupId}" 10200 method = "GET" 10201 10202 expected_kwargs = ["retry_strategy"] 10203 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10204 if extra_kwargs: 10205 raise ValueError( 10206 "get_network_security_group got unknown kwargs: {!r}".format(extra_kwargs)) 10207 10208 path_params = { 10209 "networkSecurityGroupId": network_security_group_id 10210 } 10211 10212 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10213 10214 for (k, v) in six.iteritems(path_params): 10215 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10216 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10217 10218 header_params = { 10219 "accept": "application/json", 10220 "content-type": "application/json" 10221 } 10222 10223 retry_strategy = self.base_client.get_preferred_retry_strategy( 10224 operation_retry_strategy=kwargs.get('retry_strategy'), 10225 client_retry_strategy=self.retry_strategy 10226 ) 10227 10228 if retry_strategy: 10229 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10230 self.base_client.add_opc_client_retries_header(header_params) 10231 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10232 return retry_strategy.make_retrying_call( 10233 self.base_client.call_api, 10234 resource_path=resource_path, 10235 method=method, 10236 path_params=path_params, 10237 header_params=header_params, 10238 response_type="NetworkSecurityGroup") 10239 else: 10240 return self.base_client.call_api( 10241 resource_path=resource_path, 10242 method=method, 10243 path_params=path_params, 10244 header_params=header_params, 10245 response_type="NetworkSecurityGroup") 10246 10247 def get_networking_topology(self, compartment_id, **kwargs): 10248 """ 10249 Gets a virtual networking topology for the current region. 10250 10251 10252 :param str compartment_id: (required) 10253 The `OCID`__ of the compartment. 10254 10255 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10256 10257 :param str access_level: (optional) 10258 Valid values are `ANY` and `ACCESSIBLE`. The default is `ANY`. 10259 Setting this to `ACCESSIBLE` returns only compartments for which a 10260 user has INSPECT permissions, either directly or indirectly (permissions can be on a 10261 resource in a subcompartment). A restricted set of fields is returned for compartments in which a user has 10262 indirect INSPECT permissions. 10263 10264 When set to `ANY` permissions are not checked. 10265 10266 Allowed values are: "ANY", "ACCESSIBLE" 10267 10268 :param bool query_compartment_subtree: (optional) 10269 When set to true, the hierarchy of compartments is traversed 10270 and the specified compartment and its subcompartments are 10271 inspected depending on the the setting of `accessLevel`. 10272 Default is false. 10273 10274 :param str opc_request_id: (optional) 10275 Unique identifier for the request. 10276 If you need to contact Oracle about a particular request, please provide the request ID. 10277 10278 :param str if_none_match: (optional) 10279 For querying if there is a cached value on the server. The If-None-Match HTTP request header 10280 makes the request conditional. For GET and HEAD methods, the server will send back the requested 10281 resource, with a 200 status, only if it doesn't have an ETag matching the given ones. 10282 For other methods, the request will be processed only if the eventually existing resource's 10283 ETag doesn't match any of the values listed. 10284 10285 :param str cache_control: (optional) 10286 The Cache-Control HTTP header holds directives (instructions) 10287 for caching in both requests and responses. 10288 10289 :param obj retry_strategy: (optional) 10290 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10291 10292 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. 10293 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10294 10295 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10296 10297 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.NetworkingTopology` 10298 :rtype: :class:`~oci.response.Response` 10299 10300 :example: 10301 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_networking_topology.py.html>`__ to see an example of how to use get_networking_topology API. 10302 """ 10303 resource_path = "/networkingTopology" 10304 method = "GET" 10305 10306 # Don't accept unknown kwargs 10307 expected_kwargs = [ 10308 "retry_strategy", 10309 "access_level", 10310 "query_compartment_subtree", 10311 "opc_request_id", 10312 "if_none_match", 10313 "cache_control" 10314 ] 10315 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10316 if extra_kwargs: 10317 raise ValueError( 10318 "get_networking_topology got unknown kwargs: {!r}".format(extra_kwargs)) 10319 10320 if 'access_level' in kwargs: 10321 access_level_allowed_values = ["ANY", "ACCESSIBLE"] 10322 if kwargs['access_level'] not in access_level_allowed_values: 10323 raise ValueError( 10324 "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) 10325 ) 10326 10327 query_params = { 10328 "compartmentId": compartment_id, 10329 "accessLevel": kwargs.get("access_level", missing), 10330 "queryCompartmentSubtree": kwargs.get("query_compartment_subtree", missing) 10331 } 10332 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 10333 10334 header_params = { 10335 "accept": "application/json", 10336 "content-type": "application/json", 10337 "opc-request-id": kwargs.get("opc_request_id", missing), 10338 "if-none-match": kwargs.get("if_none_match", missing), 10339 "cache-control": kwargs.get("cache_control", missing) 10340 } 10341 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 10342 10343 retry_strategy = self.base_client.get_preferred_retry_strategy( 10344 operation_retry_strategy=kwargs.get('retry_strategy'), 10345 client_retry_strategy=self.retry_strategy 10346 ) 10347 10348 if retry_strategy: 10349 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10350 self.base_client.add_opc_client_retries_header(header_params) 10351 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10352 return retry_strategy.make_retrying_call( 10353 self.base_client.call_api, 10354 resource_path=resource_path, 10355 method=method, 10356 query_params=query_params, 10357 header_params=header_params, 10358 response_type="NetworkingTopology") 10359 else: 10360 return self.base_client.call_api( 10361 resource_path=resource_path, 10362 method=method, 10363 query_params=query_params, 10364 header_params=header_params, 10365 response_type="NetworkingTopology") 10366 10367 def get_private_ip(self, private_ip_id, **kwargs): 10368 """ 10369 Gets the specified private IP. You must specify the object's `OCID`__. 10370 Alternatively, you can get the object by using 10371 :func:`list_private_ips` 10372 with the private IP address (for example, 10.0.3.3) and subnet `OCID`__. 10373 10374 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10375 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10376 10377 10378 :param str private_ip_id: (required) 10379 The `OCID`__ of the private IP. 10380 10381 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 10382 10383 :param obj retry_strategy: (optional) 10384 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10385 10386 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. 10387 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10388 10389 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10390 10391 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PrivateIp` 10392 :rtype: :class:`~oci.response.Response` 10393 10394 :example: 10395 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_private_ip.py.html>`__ to see an example of how to use get_private_ip API. 10396 """ 10397 resource_path = "/privateIps/{privateIpId}" 10398 method = "GET" 10399 10400 expected_kwargs = ["retry_strategy"] 10401 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10402 if extra_kwargs: 10403 raise ValueError( 10404 "get_private_ip got unknown kwargs: {!r}".format(extra_kwargs)) 10405 10406 path_params = { 10407 "privateIpId": private_ip_id 10408 } 10409 10410 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10411 10412 for (k, v) in six.iteritems(path_params): 10413 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10414 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10415 10416 header_params = { 10417 "accept": "application/json", 10418 "content-type": "application/json" 10419 } 10420 10421 retry_strategy = self.base_client.get_preferred_retry_strategy( 10422 operation_retry_strategy=kwargs.get('retry_strategy'), 10423 client_retry_strategy=self.retry_strategy 10424 ) 10425 10426 if retry_strategy: 10427 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10428 self.base_client.add_opc_client_retries_header(header_params) 10429 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10430 return retry_strategy.make_retrying_call( 10431 self.base_client.call_api, 10432 resource_path=resource_path, 10433 method=method, 10434 path_params=path_params, 10435 header_params=header_params, 10436 response_type="PrivateIp") 10437 else: 10438 return self.base_client.call_api( 10439 resource_path=resource_path, 10440 method=method, 10441 path_params=path_params, 10442 header_params=header_params, 10443 response_type="PrivateIp") 10444 10445 def get_public_ip(self, public_ip_id, **kwargs): 10446 """ 10447 Gets the specified public IP. You must specify the object's `OCID`__. 10448 10449 Alternatively, you can get the object by using :func:`get_public_ip_by_ip_address` 10450 with the public IP address (for example, 203.0.113.2). 10451 10452 Or you can use :func:`get_public_ip_by_private_ip_id` 10453 with the `OCID`__ of the private IP that the public IP is assigned to. 10454 10455 **Note:** If you're fetching a reserved public IP that is in the process of being 10456 moved to a different private IP, the service returns the public IP object with 10457 `lifecycleState` = ASSIGNING and `assignedEntityId` = `OCID`__ of the target private IP. 10458 10459 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10460 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10461 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10462 10463 10464 :param str public_ip_id: (required) 10465 The `OCID`__ of the public IP. 10466 10467 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 10468 10469 :param obj retry_strategy: (optional) 10470 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10471 10472 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. 10473 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10474 10475 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10476 10477 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIp` 10478 :rtype: :class:`~oci.response.Response` 10479 10480 :example: 10481 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_public_ip.py.html>`__ to see an example of how to use get_public_ip API. 10482 """ 10483 resource_path = "/publicIps/{publicIpId}" 10484 method = "GET" 10485 10486 expected_kwargs = ["retry_strategy"] 10487 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10488 if extra_kwargs: 10489 raise ValueError( 10490 "get_public_ip got unknown kwargs: {!r}".format(extra_kwargs)) 10491 10492 path_params = { 10493 "publicIpId": public_ip_id 10494 } 10495 10496 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10497 10498 for (k, v) in six.iteritems(path_params): 10499 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10500 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10501 10502 header_params = { 10503 "accept": "application/json", 10504 "content-type": "application/json" 10505 } 10506 10507 retry_strategy = self.base_client.get_preferred_retry_strategy( 10508 operation_retry_strategy=kwargs.get('retry_strategy'), 10509 client_retry_strategy=self.retry_strategy 10510 ) 10511 10512 if retry_strategy: 10513 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10514 self.base_client.add_opc_client_retries_header(header_params) 10515 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10516 return retry_strategy.make_retrying_call( 10517 self.base_client.call_api, 10518 resource_path=resource_path, 10519 method=method, 10520 path_params=path_params, 10521 header_params=header_params, 10522 response_type="PublicIp") 10523 else: 10524 return self.base_client.call_api( 10525 resource_path=resource_path, 10526 method=method, 10527 path_params=path_params, 10528 header_params=header_params, 10529 response_type="PublicIp") 10530 10531 def get_public_ip_by_ip_address(self, get_public_ip_by_ip_address_details, **kwargs): 10532 """ 10533 Gets the public IP based on the public IP address (for example, 203.0.113.2). 10534 10535 **Note:** If you're fetching a reserved public IP that is in the process of being 10536 moved to a different private IP, the service returns the public IP object with 10537 `lifecycleState` = ASSIGNING and `assignedEntityId` = `OCID`__ of the target private IP. 10538 10539 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10540 10541 10542 :param oci.core.models.GetPublicIpByIpAddressDetails get_public_ip_by_ip_address_details: (required) 10543 IP address details for fetching the public IP. 10544 10545 :param obj retry_strategy: (optional) 10546 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10547 10548 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. 10549 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10550 10551 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10552 10553 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIp` 10554 :rtype: :class:`~oci.response.Response` 10555 10556 :example: 10557 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_public_ip_by_ip_address.py.html>`__ to see an example of how to use get_public_ip_by_ip_address API. 10558 """ 10559 resource_path = "/publicIps/actions/getByIpAddress" 10560 method = "POST" 10561 10562 expected_kwargs = ["retry_strategy"] 10563 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10564 if extra_kwargs: 10565 raise ValueError( 10566 "get_public_ip_by_ip_address got unknown kwargs: {!r}".format(extra_kwargs)) 10567 10568 header_params = { 10569 "accept": "application/json", 10570 "content-type": "application/json" 10571 } 10572 10573 retry_strategy = self.base_client.get_preferred_retry_strategy( 10574 operation_retry_strategy=kwargs.get('retry_strategy'), 10575 client_retry_strategy=self.retry_strategy 10576 ) 10577 10578 if retry_strategy: 10579 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10580 self.base_client.add_opc_client_retries_header(header_params) 10581 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10582 return retry_strategy.make_retrying_call( 10583 self.base_client.call_api, 10584 resource_path=resource_path, 10585 method=method, 10586 header_params=header_params, 10587 body=get_public_ip_by_ip_address_details, 10588 response_type="PublicIp") 10589 else: 10590 return self.base_client.call_api( 10591 resource_path=resource_path, 10592 method=method, 10593 header_params=header_params, 10594 body=get_public_ip_by_ip_address_details, 10595 response_type="PublicIp") 10596 10597 def get_public_ip_by_private_ip_id(self, get_public_ip_by_private_ip_id_details, **kwargs): 10598 """ 10599 Gets the public IP assigned to the specified private IP. You must specify the OCID 10600 of the private IP. If no public IP is assigned, a 404 is returned. 10601 10602 **Note:** If you're fetching a reserved public IP that is in the process of being 10603 moved to a different private IP, and you provide the `OCID`__ of the original private 10604 IP, this operation returns a 404. If you instead provide the `OCID`__ of the target 10605 private IP, or if you instead call 10606 :func:`get_public_ip` or 10607 :func:`get_public_ip_by_ip_address`, the 10608 service returns the public IP object with `lifecycleState` = ASSIGNING and 10609 `assignedEntityId` = `OCID`__ of the target private IP. 10610 10611 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10612 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10613 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10614 10615 10616 :param oci.core.models.GetPublicIpByPrivateIpIdDetails get_public_ip_by_private_ip_id_details: (required) 10617 Private IP details for fetching the public IP. 10618 10619 :param obj retry_strategy: (optional) 10620 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10621 10622 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. 10623 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10624 10625 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10626 10627 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIp` 10628 :rtype: :class:`~oci.response.Response` 10629 10630 :example: 10631 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_public_ip_by_private_ip_id.py.html>`__ to see an example of how to use get_public_ip_by_private_ip_id API. 10632 """ 10633 resource_path = "/publicIps/actions/getByPrivateIpId" 10634 method = "POST" 10635 10636 expected_kwargs = ["retry_strategy"] 10637 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10638 if extra_kwargs: 10639 raise ValueError( 10640 "get_public_ip_by_private_ip_id got unknown kwargs: {!r}".format(extra_kwargs)) 10641 10642 header_params = { 10643 "accept": "application/json", 10644 "content-type": "application/json" 10645 } 10646 10647 retry_strategy = self.base_client.get_preferred_retry_strategy( 10648 operation_retry_strategy=kwargs.get('retry_strategy'), 10649 client_retry_strategy=self.retry_strategy 10650 ) 10651 10652 if retry_strategy: 10653 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10654 self.base_client.add_opc_client_retries_header(header_params) 10655 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10656 return retry_strategy.make_retrying_call( 10657 self.base_client.call_api, 10658 resource_path=resource_path, 10659 method=method, 10660 header_params=header_params, 10661 body=get_public_ip_by_private_ip_id_details, 10662 response_type="PublicIp") 10663 else: 10664 return self.base_client.call_api( 10665 resource_path=resource_path, 10666 method=method, 10667 header_params=header_params, 10668 body=get_public_ip_by_private_ip_id_details, 10669 response_type="PublicIp") 10670 10671 def get_public_ip_pool(self, public_ip_pool_id, **kwargs): 10672 """ 10673 Gets the specified `PublicIpPool` object. You must specify the object's `OCID`__. 10674 10675 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10676 10677 10678 :param str public_ip_pool_id: (required) 10679 The `OCID`__ of the public IP pool. 10680 10681 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10682 10683 :param str opc_request_id: (optional) 10684 Unique identifier for the request. 10685 If you need to contact Oracle about a particular request, please provide the request ID. 10686 10687 :param obj retry_strategy: (optional) 10688 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10689 10690 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. 10691 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10692 10693 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10694 10695 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` 10696 :rtype: :class:`~oci.response.Response` 10697 10698 :example: 10699 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_public_ip_pool.py.html>`__ to see an example of how to use get_public_ip_pool API. 10700 """ 10701 resource_path = "/publicIpPools/{publicIpPoolId}" 10702 method = "GET" 10703 10704 # Don't accept unknown kwargs 10705 expected_kwargs = [ 10706 "retry_strategy", 10707 "opc_request_id" 10708 ] 10709 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10710 if extra_kwargs: 10711 raise ValueError( 10712 "get_public_ip_pool got unknown kwargs: {!r}".format(extra_kwargs)) 10713 10714 path_params = { 10715 "publicIpPoolId": public_ip_pool_id 10716 } 10717 10718 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10719 10720 for (k, v) in six.iteritems(path_params): 10721 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10722 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10723 10724 header_params = { 10725 "accept": "application/json", 10726 "content-type": "application/json", 10727 "opc-request-id": kwargs.get("opc_request_id", missing) 10728 } 10729 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 10730 10731 retry_strategy = self.base_client.get_preferred_retry_strategy( 10732 operation_retry_strategy=kwargs.get('retry_strategy'), 10733 client_retry_strategy=self.retry_strategy 10734 ) 10735 10736 if retry_strategy: 10737 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10738 self.base_client.add_opc_client_retries_header(header_params) 10739 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10740 return retry_strategy.make_retrying_call( 10741 self.base_client.call_api, 10742 resource_path=resource_path, 10743 method=method, 10744 path_params=path_params, 10745 header_params=header_params, 10746 response_type="PublicIpPool") 10747 else: 10748 return self.base_client.call_api( 10749 resource_path=resource_path, 10750 method=method, 10751 path_params=path_params, 10752 header_params=header_params, 10753 response_type="PublicIpPool") 10754 10755 def get_remote_peering_connection(self, remote_peering_connection_id, **kwargs): 10756 """ 10757 Get the specified remote peering connection's information. 10758 10759 10760 :param str remote_peering_connection_id: (required) 10761 The `OCID`__ of the remote peering connection (RPC). 10762 10763 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 10764 10765 :param obj retry_strategy: (optional) 10766 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10767 10768 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. 10769 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10770 10771 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10772 10773 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.RemotePeeringConnection` 10774 :rtype: :class:`~oci.response.Response` 10775 10776 :example: 10777 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_remote_peering_connection.py.html>`__ to see an example of how to use get_remote_peering_connection API. 10778 """ 10779 resource_path = "/remotePeeringConnections/{remotePeeringConnectionId}" 10780 method = "GET" 10781 10782 expected_kwargs = ["retry_strategy"] 10783 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10784 if extra_kwargs: 10785 raise ValueError( 10786 "get_remote_peering_connection got unknown kwargs: {!r}".format(extra_kwargs)) 10787 10788 path_params = { 10789 "remotePeeringConnectionId": remote_peering_connection_id 10790 } 10791 10792 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10793 10794 for (k, v) in six.iteritems(path_params): 10795 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10796 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10797 10798 header_params = { 10799 "accept": "application/json", 10800 "content-type": "application/json" 10801 } 10802 10803 retry_strategy = self.base_client.get_preferred_retry_strategy( 10804 operation_retry_strategy=kwargs.get('retry_strategy'), 10805 client_retry_strategy=self.retry_strategy 10806 ) 10807 10808 if retry_strategy: 10809 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10810 self.base_client.add_opc_client_retries_header(header_params) 10811 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10812 return retry_strategy.make_retrying_call( 10813 self.base_client.call_api, 10814 resource_path=resource_path, 10815 method=method, 10816 path_params=path_params, 10817 header_params=header_params, 10818 response_type="RemotePeeringConnection") 10819 else: 10820 return self.base_client.call_api( 10821 resource_path=resource_path, 10822 method=method, 10823 path_params=path_params, 10824 header_params=header_params, 10825 response_type="RemotePeeringConnection") 10826 10827 def get_route_table(self, rt_id, **kwargs): 10828 """ 10829 Gets the specified route table's information. 10830 10831 10832 :param str rt_id: (required) 10833 The `OCID`__ of the route table. 10834 10835 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 10836 10837 :param obj retry_strategy: (optional) 10838 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10839 10840 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. 10841 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10842 10843 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10844 10845 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.RouteTable` 10846 :rtype: :class:`~oci.response.Response` 10847 10848 :example: 10849 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_route_table.py.html>`__ to see an example of how to use get_route_table API. 10850 """ 10851 resource_path = "/routeTables/{rtId}" 10852 method = "GET" 10853 10854 expected_kwargs = ["retry_strategy"] 10855 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10856 if extra_kwargs: 10857 raise ValueError( 10858 "get_route_table got unknown kwargs: {!r}".format(extra_kwargs)) 10859 10860 path_params = { 10861 "rtId": rt_id 10862 } 10863 10864 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10865 10866 for (k, v) in six.iteritems(path_params): 10867 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10868 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10869 10870 header_params = { 10871 "accept": "application/json", 10872 "content-type": "application/json" 10873 } 10874 10875 retry_strategy = self.base_client.get_preferred_retry_strategy( 10876 operation_retry_strategy=kwargs.get('retry_strategy'), 10877 client_retry_strategy=self.retry_strategy 10878 ) 10879 10880 if retry_strategy: 10881 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10882 self.base_client.add_opc_client_retries_header(header_params) 10883 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10884 return retry_strategy.make_retrying_call( 10885 self.base_client.call_api, 10886 resource_path=resource_path, 10887 method=method, 10888 path_params=path_params, 10889 header_params=header_params, 10890 response_type="RouteTable") 10891 else: 10892 return self.base_client.call_api( 10893 resource_path=resource_path, 10894 method=method, 10895 path_params=path_params, 10896 header_params=header_params, 10897 response_type="RouteTable") 10898 10899 def get_security_list(self, security_list_id, **kwargs): 10900 """ 10901 Gets the specified security list's information. 10902 10903 10904 :param str security_list_id: (required) 10905 The `OCID`__ of the security list. 10906 10907 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 10908 10909 :param obj retry_strategy: (optional) 10910 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10911 10912 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. 10913 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10914 10915 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10916 10917 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.SecurityList` 10918 :rtype: :class:`~oci.response.Response` 10919 10920 :example: 10921 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_security_list.py.html>`__ to see an example of how to use get_security_list API. 10922 """ 10923 resource_path = "/securityLists/{securityListId}" 10924 method = "GET" 10925 10926 expected_kwargs = ["retry_strategy"] 10927 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10928 if extra_kwargs: 10929 raise ValueError( 10930 "get_security_list got unknown kwargs: {!r}".format(extra_kwargs)) 10931 10932 path_params = { 10933 "securityListId": security_list_id 10934 } 10935 10936 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10937 10938 for (k, v) in six.iteritems(path_params): 10939 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10940 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10941 10942 header_params = { 10943 "accept": "application/json", 10944 "content-type": "application/json" 10945 } 10946 10947 retry_strategy = self.base_client.get_preferred_retry_strategy( 10948 operation_retry_strategy=kwargs.get('retry_strategy'), 10949 client_retry_strategy=self.retry_strategy 10950 ) 10951 10952 if retry_strategy: 10953 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10954 self.base_client.add_opc_client_retries_header(header_params) 10955 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10956 return retry_strategy.make_retrying_call( 10957 self.base_client.call_api, 10958 resource_path=resource_path, 10959 method=method, 10960 path_params=path_params, 10961 header_params=header_params, 10962 response_type="SecurityList") 10963 else: 10964 return self.base_client.call_api( 10965 resource_path=resource_path, 10966 method=method, 10967 path_params=path_params, 10968 header_params=header_params, 10969 response_type="SecurityList") 10970 10971 def get_service(self, service_id, **kwargs): 10972 """ 10973 Gets the specified :class:`Service` object. 10974 10975 10976 :param str service_id: (required) 10977 The service's `OCID`__. 10978 10979 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 10980 10981 :param obj retry_strategy: (optional) 10982 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10983 10984 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. 10985 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10986 10987 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10988 10989 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Service` 10990 :rtype: :class:`~oci.response.Response` 10991 10992 :example: 10993 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_service.py.html>`__ to see an example of how to use get_service API. 10994 """ 10995 resource_path = "/services/{serviceId}" 10996 method = "GET" 10997 10998 expected_kwargs = ["retry_strategy"] 10999 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11000 if extra_kwargs: 11001 raise ValueError( 11002 "get_service got unknown kwargs: {!r}".format(extra_kwargs)) 11003 11004 path_params = { 11005 "serviceId": service_id 11006 } 11007 11008 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11009 11010 for (k, v) in six.iteritems(path_params): 11011 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11012 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11013 11014 header_params = { 11015 "accept": "application/json", 11016 "content-type": "application/json" 11017 } 11018 11019 retry_strategy = self.base_client.get_preferred_retry_strategy( 11020 operation_retry_strategy=kwargs.get('retry_strategy'), 11021 client_retry_strategy=self.retry_strategy 11022 ) 11023 11024 if retry_strategy: 11025 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11026 self.base_client.add_opc_client_retries_header(header_params) 11027 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11028 return retry_strategy.make_retrying_call( 11029 self.base_client.call_api, 11030 resource_path=resource_path, 11031 method=method, 11032 path_params=path_params, 11033 header_params=header_params, 11034 response_type="Service") 11035 else: 11036 return self.base_client.call_api( 11037 resource_path=resource_path, 11038 method=method, 11039 path_params=path_params, 11040 header_params=header_params, 11041 response_type="Service") 11042 11043 def get_service_gateway(self, service_gateway_id, **kwargs): 11044 """ 11045 Gets the specified service gateway's information. 11046 11047 11048 :param str service_gateway_id: (required) 11049 The service gateway's `OCID`__. 11050 11051 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 11052 11053 :param obj retry_strategy: (optional) 11054 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11055 11056 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. 11057 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11058 11059 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11060 11061 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ServiceGateway` 11062 :rtype: :class:`~oci.response.Response` 11063 11064 :example: 11065 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_service_gateway.py.html>`__ to see an example of how to use get_service_gateway API. 11066 """ 11067 resource_path = "/serviceGateways/{serviceGatewayId}" 11068 method = "GET" 11069 11070 expected_kwargs = ["retry_strategy"] 11071 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11072 if extra_kwargs: 11073 raise ValueError( 11074 "get_service_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 11075 11076 path_params = { 11077 "serviceGatewayId": service_gateway_id 11078 } 11079 11080 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11081 11082 for (k, v) in six.iteritems(path_params): 11083 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11084 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11085 11086 header_params = { 11087 "accept": "application/json", 11088 "content-type": "application/json" 11089 } 11090 11091 retry_strategy = self.base_client.get_preferred_retry_strategy( 11092 operation_retry_strategy=kwargs.get('retry_strategy'), 11093 client_retry_strategy=self.retry_strategy 11094 ) 11095 11096 if retry_strategy: 11097 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11098 self.base_client.add_opc_client_retries_header(header_params) 11099 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11100 return retry_strategy.make_retrying_call( 11101 self.base_client.call_api, 11102 resource_path=resource_path, 11103 method=method, 11104 path_params=path_params, 11105 header_params=header_params, 11106 response_type="ServiceGateway") 11107 else: 11108 return self.base_client.call_api( 11109 resource_path=resource_path, 11110 method=method, 11111 path_params=path_params, 11112 header_params=header_params, 11113 response_type="ServiceGateway") 11114 11115 def get_subnet(self, subnet_id, **kwargs): 11116 """ 11117 Gets the specified subnet's information. 11118 11119 11120 :param str subnet_id: (required) 11121 The `OCID`__ of the subnet. 11122 11123 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 11124 11125 :param obj retry_strategy: (optional) 11126 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11127 11128 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. 11129 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11130 11131 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11132 11133 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Subnet` 11134 :rtype: :class:`~oci.response.Response` 11135 11136 :example: 11137 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_subnet.py.html>`__ to see an example of how to use get_subnet API. 11138 """ 11139 resource_path = "/subnets/{subnetId}" 11140 method = "GET" 11141 11142 expected_kwargs = ["retry_strategy"] 11143 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11144 if extra_kwargs: 11145 raise ValueError( 11146 "get_subnet got unknown kwargs: {!r}".format(extra_kwargs)) 11147 11148 path_params = { 11149 "subnetId": subnet_id 11150 } 11151 11152 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11153 11154 for (k, v) in six.iteritems(path_params): 11155 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11156 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11157 11158 header_params = { 11159 "accept": "application/json", 11160 "content-type": "application/json" 11161 } 11162 11163 retry_strategy = self.base_client.get_preferred_retry_strategy( 11164 operation_retry_strategy=kwargs.get('retry_strategy'), 11165 client_retry_strategy=self.retry_strategy 11166 ) 11167 11168 if retry_strategy: 11169 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11170 self.base_client.add_opc_client_retries_header(header_params) 11171 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11172 return retry_strategy.make_retrying_call( 11173 self.base_client.call_api, 11174 resource_path=resource_path, 11175 method=method, 11176 path_params=path_params, 11177 header_params=header_params, 11178 response_type="Subnet") 11179 else: 11180 return self.base_client.call_api( 11181 resource_path=resource_path, 11182 method=method, 11183 path_params=path_params, 11184 header_params=header_params, 11185 response_type="Subnet") 11186 11187 def get_subnet_topology(self, compartment_id, subnet_id, **kwargs): 11188 """ 11189 Gets a topology for a given subnet. 11190 11191 11192 :param str compartment_id: (required) 11193 The `OCID`__ of the compartment. 11194 11195 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 11196 11197 :param str subnet_id: (required) 11198 The `OCID`__ of the subnet. 11199 11200 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 11201 11202 :param str access_level: (optional) 11203 Valid values are `ANY` and `ACCESSIBLE`. The default is `ANY`. 11204 Setting this to `ACCESSIBLE` returns only compartments for which a 11205 user has INSPECT permissions, either directly or indirectly (permissions can be on a 11206 resource in a subcompartment). A restricted set of fields is returned for compartments in which a user has 11207 indirect INSPECT permissions. 11208 11209 When set to `ANY` permissions are not checked. 11210 11211 Allowed values are: "ANY", "ACCESSIBLE" 11212 11213 :param bool query_compartment_subtree: (optional) 11214 When set to true, the hierarchy of compartments is traversed 11215 and the specified compartment and its subcompartments are 11216 inspected depending on the the setting of `accessLevel`. 11217 Default is false. 11218 11219 :param str opc_request_id: (optional) 11220 Unique identifier for the request. 11221 If you need to contact Oracle about a particular request, please provide the request ID. 11222 11223 :param str if_none_match: (optional) 11224 For querying if there is a cached value on the server. The If-None-Match HTTP request header 11225 makes the request conditional. For GET and HEAD methods, the server will send back the requested 11226 resource, with a 200 status, only if it doesn't have an ETag matching the given ones. 11227 For other methods, the request will be processed only if the eventually existing resource's 11228 ETag doesn't match any of the values listed. 11229 11230 :param str cache_control: (optional) 11231 The Cache-Control HTTP header holds directives (instructions) 11232 for caching in both requests and responses. 11233 11234 :param obj retry_strategy: (optional) 11235 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11236 11237 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. 11238 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11239 11240 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11241 11242 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.SubnetTopology` 11243 :rtype: :class:`~oci.response.Response` 11244 11245 :example: 11246 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_subnet_topology.py.html>`__ to see an example of how to use get_subnet_topology API. 11247 """ 11248 resource_path = "/subnetTopology" 11249 method = "GET" 11250 11251 # Don't accept unknown kwargs 11252 expected_kwargs = [ 11253 "retry_strategy", 11254 "access_level", 11255 "query_compartment_subtree", 11256 "opc_request_id", 11257 "if_none_match", 11258 "cache_control" 11259 ] 11260 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11261 if extra_kwargs: 11262 raise ValueError( 11263 "get_subnet_topology got unknown kwargs: {!r}".format(extra_kwargs)) 11264 11265 if 'access_level' in kwargs: 11266 access_level_allowed_values = ["ANY", "ACCESSIBLE"] 11267 if kwargs['access_level'] not in access_level_allowed_values: 11268 raise ValueError( 11269 "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) 11270 ) 11271 11272 query_params = { 11273 "compartmentId": compartment_id, 11274 "accessLevel": kwargs.get("access_level", missing), 11275 "queryCompartmentSubtree": kwargs.get("query_compartment_subtree", missing), 11276 "subnetId": subnet_id 11277 } 11278 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 11279 11280 header_params = { 11281 "accept": "application/json", 11282 "content-type": "application/json", 11283 "opc-request-id": kwargs.get("opc_request_id", missing), 11284 "if-none-match": kwargs.get("if_none_match", missing), 11285 "cache-control": kwargs.get("cache_control", missing) 11286 } 11287 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11288 11289 retry_strategy = self.base_client.get_preferred_retry_strategy( 11290 operation_retry_strategy=kwargs.get('retry_strategy'), 11291 client_retry_strategy=self.retry_strategy 11292 ) 11293 11294 if retry_strategy: 11295 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11296 self.base_client.add_opc_client_retries_header(header_params) 11297 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11298 return retry_strategy.make_retrying_call( 11299 self.base_client.call_api, 11300 resource_path=resource_path, 11301 method=method, 11302 query_params=query_params, 11303 header_params=header_params, 11304 response_type="SubnetTopology") 11305 else: 11306 return self.base_client.call_api( 11307 resource_path=resource_path, 11308 method=method, 11309 query_params=query_params, 11310 header_params=header_params, 11311 response_type="SubnetTopology") 11312 11313 def get_tunnel_cpe_device_config(self, ipsc_id, tunnel_id, **kwargs): 11314 """ 11315 Gets the set of CPE configuration answers for the tunnel, which the customer provided in 11316 :func:`update_tunnel_cpe_device_config`. 11317 To get the full set of content for the tunnel (any answers merged with the template of other 11318 information specific to the CPE device type), use 11319 :func:`get_tunnel_cpe_device_config_content`. 11320 11321 11322 :param str ipsc_id: (required) 11323 The `OCID`__ of the IPSec connection. 11324 11325 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 11326 11327 :param str tunnel_id: (required) 11328 The `OCID`__ of the tunnel. 11329 11330 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 11331 11332 :param str opc_request_id: (optional) 11333 Unique identifier for the request. 11334 If you need to contact Oracle about a particular request, please provide the request ID. 11335 11336 :param obj retry_strategy: (optional) 11337 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11338 11339 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. 11340 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11341 11342 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11343 11344 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.TunnelCpeDeviceConfig` 11345 :rtype: :class:`~oci.response.Response` 11346 11347 :example: 11348 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_tunnel_cpe_device_config.py.html>`__ to see an example of how to use get_tunnel_cpe_device_config API. 11349 """ 11350 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/tunnelDeviceConfig" 11351 method = "GET" 11352 11353 # Don't accept unknown kwargs 11354 expected_kwargs = [ 11355 "retry_strategy", 11356 "opc_request_id" 11357 ] 11358 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11359 if extra_kwargs: 11360 raise ValueError( 11361 "get_tunnel_cpe_device_config got unknown kwargs: {!r}".format(extra_kwargs)) 11362 11363 path_params = { 11364 "ipscId": ipsc_id, 11365 "tunnelId": tunnel_id 11366 } 11367 11368 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11369 11370 for (k, v) in six.iteritems(path_params): 11371 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11372 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11373 11374 header_params = { 11375 "accept": "application/json", 11376 "content-type": "application/json", 11377 "opc-request-id": kwargs.get("opc_request_id", missing) 11378 } 11379 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11380 11381 retry_strategy = self.base_client.get_preferred_retry_strategy( 11382 operation_retry_strategy=kwargs.get('retry_strategy'), 11383 client_retry_strategy=self.retry_strategy 11384 ) 11385 11386 if retry_strategy: 11387 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11388 self.base_client.add_opc_client_retries_header(header_params) 11389 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11390 return retry_strategy.make_retrying_call( 11391 self.base_client.call_api, 11392 resource_path=resource_path, 11393 method=method, 11394 path_params=path_params, 11395 header_params=header_params, 11396 response_type="TunnelCpeDeviceConfig") 11397 else: 11398 return self.base_client.call_api( 11399 resource_path=resource_path, 11400 method=method, 11401 path_params=path_params, 11402 header_params=header_params, 11403 response_type="TunnelCpeDeviceConfig") 11404 11405 def get_tunnel_cpe_device_config_content(self, ipsc_id, tunnel_id, **kwargs): 11406 """ 11407 Renders a set of CPE configuration content for the specified IPSec tunnel. The content helps a 11408 network engineer configure the actual CPE device (for example, a hardware router) that the specified 11409 IPSec tunnel terminates on. 11410 11411 The rendered content is specific to the type of CPE device (for example, Cisco ASA). Therefore the 11412 :class:`Cpe` used by the specified :class:`IPSecConnection` 11413 must have the CPE's device type specified by the `cpeDeviceShapeId` attribute. The content 11414 optionally includes answers that the customer provides (see 11415 :func:`update_tunnel_cpe_device_config`), 11416 merged with a template of other information specific to the CPE device type. 11417 11418 The operation returns configuration information for only the specified IPSec tunnel. 11419 Here are other similar operations: 11420 11421 * :func:`get_ipsec_cpe_device_config_content` 11422 returns CPE configuration content for all tunnels in a single IPSec connection. 11423 * :func:`get_cpe_device_config_content` 11424 returns CPE configuration content for *all* IPSec connections that use a specific CPE. 11425 11426 11427 :param str ipsc_id: (required) 11428 The `OCID`__ of the IPSec connection. 11429 11430 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 11431 11432 :param str tunnel_id: (required) 11433 The `OCID`__ of the tunnel. 11434 11435 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 11436 11437 :param str opc_request_id: (optional) 11438 Unique identifier for the request. 11439 If you need to contact Oracle about a particular request, please provide the request ID. 11440 11441 :param obj retry_strategy: (optional) 11442 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11443 11444 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. 11445 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11446 11447 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11448 11449 :return: A :class:`~oci.response.Response` object with data of type stream 11450 :rtype: :class:`~oci.response.Response` 11451 11452 :example: 11453 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_tunnel_cpe_device_config_content.py.html>`__ to see an example of how to use get_tunnel_cpe_device_config_content API. 11454 """ 11455 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/tunnelDeviceConfig/content" 11456 method = "GET" 11457 11458 # Don't accept unknown kwargs 11459 expected_kwargs = [ 11460 "retry_strategy", 11461 "opc_request_id" 11462 ] 11463 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11464 if extra_kwargs: 11465 raise ValueError( 11466 "get_tunnel_cpe_device_config_content got unknown kwargs: {!r}".format(extra_kwargs)) 11467 11468 path_params = { 11469 "ipscId": ipsc_id, 11470 "tunnelId": tunnel_id 11471 } 11472 11473 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11474 11475 for (k, v) in six.iteritems(path_params): 11476 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11477 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11478 11479 header_params = { 11480 "accept": "text/plain; charset=utf-8", 11481 "content-type": "application/json", 11482 "opc-request-id": kwargs.get("opc_request_id", missing) 11483 } 11484 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11485 11486 retry_strategy = self.base_client.get_preferred_retry_strategy( 11487 operation_retry_strategy=kwargs.get('retry_strategy'), 11488 client_retry_strategy=self.retry_strategy 11489 ) 11490 11491 if retry_strategy: 11492 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11493 self.base_client.add_opc_client_retries_header(header_params) 11494 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11495 return retry_strategy.make_retrying_call( 11496 self.base_client.call_api, 11497 resource_path=resource_path, 11498 method=method, 11499 path_params=path_params, 11500 header_params=header_params, 11501 response_type="stream") 11502 else: 11503 return self.base_client.call_api( 11504 resource_path=resource_path, 11505 method=method, 11506 path_params=path_params, 11507 header_params=header_params, 11508 response_type="stream") 11509 11510 def get_upgrade_status(self, drg_id, **kwargs): 11511 """ 11512 Returns the DRG upgrade status. The status can be not updated, in progress, or updated. Also indicates how much of the upgrade is completed. 11513 11514 11515 :param str drg_id: (required) 11516 The `OCID`__ of the DRG. 11517 11518 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 11519 11520 :param str opc_request_id: (optional) 11521 Unique identifier for the request. 11522 If you need to contact Oracle about a particular request, please provide the request ID. 11523 11524 :param obj retry_strategy: (optional) 11525 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11526 11527 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. 11528 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11529 11530 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11531 11532 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.UpgradeStatus` 11533 :rtype: :class:`~oci.response.Response` 11534 11535 :example: 11536 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_upgrade_status.py.html>`__ to see an example of how to use get_upgrade_status API. 11537 """ 11538 resource_path = "/drgs/{drgId}/actions/upgradeStatus" 11539 method = "GET" 11540 11541 # Don't accept unknown kwargs 11542 expected_kwargs = [ 11543 "retry_strategy", 11544 "opc_request_id" 11545 ] 11546 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11547 if extra_kwargs: 11548 raise ValueError( 11549 "get_upgrade_status got unknown kwargs: {!r}".format(extra_kwargs)) 11550 11551 path_params = { 11552 "drgId": drg_id 11553 } 11554 11555 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11556 11557 for (k, v) in six.iteritems(path_params): 11558 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11559 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11560 11561 header_params = { 11562 "accept": "application/json", 11563 "content-type": "application/json", 11564 "opc-request-id": kwargs.get("opc_request_id", missing) 11565 } 11566 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11567 11568 retry_strategy = self.base_client.get_preferred_retry_strategy( 11569 operation_retry_strategy=kwargs.get('retry_strategy'), 11570 client_retry_strategy=self.retry_strategy 11571 ) 11572 11573 if retry_strategy: 11574 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11575 self.base_client.add_opc_client_retries_header(header_params) 11576 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11577 return retry_strategy.make_retrying_call( 11578 self.base_client.call_api, 11579 resource_path=resource_path, 11580 method=method, 11581 path_params=path_params, 11582 header_params=header_params, 11583 response_type="UpgradeStatus") 11584 else: 11585 return self.base_client.call_api( 11586 resource_path=resource_path, 11587 method=method, 11588 path_params=path_params, 11589 header_params=header_params, 11590 response_type="UpgradeStatus") 11591 11592 def get_vcn(self, vcn_id, **kwargs): 11593 """ 11594 Gets the specified VCN's information. 11595 11596 11597 :param str vcn_id: (required) 11598 The `OCID`__ of the VCN. 11599 11600 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 11601 11602 :param obj retry_strategy: (optional) 11603 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11604 11605 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. 11606 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11607 11608 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11609 11610 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vcn` 11611 :rtype: :class:`~oci.response.Response` 11612 11613 :example: 11614 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_vcn.py.html>`__ to see an example of how to use get_vcn API. 11615 """ 11616 resource_path = "/vcns/{vcnId}" 11617 method = "GET" 11618 11619 expected_kwargs = ["retry_strategy"] 11620 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11621 if extra_kwargs: 11622 raise ValueError( 11623 "get_vcn got unknown kwargs: {!r}".format(extra_kwargs)) 11624 11625 path_params = { 11626 "vcnId": vcn_id 11627 } 11628 11629 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11630 11631 for (k, v) in six.iteritems(path_params): 11632 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11633 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11634 11635 header_params = { 11636 "accept": "application/json", 11637 "content-type": "application/json" 11638 } 11639 11640 retry_strategy = self.base_client.get_preferred_retry_strategy( 11641 operation_retry_strategy=kwargs.get('retry_strategy'), 11642 client_retry_strategy=self.retry_strategy 11643 ) 11644 11645 if retry_strategy: 11646 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11647 self.base_client.add_opc_client_retries_header(header_params) 11648 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11649 return retry_strategy.make_retrying_call( 11650 self.base_client.call_api, 11651 resource_path=resource_path, 11652 method=method, 11653 path_params=path_params, 11654 header_params=header_params, 11655 response_type="Vcn") 11656 else: 11657 return self.base_client.call_api( 11658 resource_path=resource_path, 11659 method=method, 11660 path_params=path_params, 11661 header_params=header_params, 11662 response_type="Vcn") 11663 11664 def get_vcn_dns_resolver_association(self, vcn_id, **kwargs): 11665 """ 11666 Get the associated DNS resolver information with a vcn 11667 11668 11669 :param str vcn_id: (required) 11670 The `OCID`__ of the VCN. 11671 11672 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 11673 11674 :param str opc_request_id: (optional) 11675 Unique identifier for the request. 11676 If you need to contact Oracle about a particular request, please provide the request ID. 11677 11678 :param obj retry_strategy: (optional) 11679 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11680 11681 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. 11682 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11683 11684 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11685 11686 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VcnDnsResolverAssociation` 11687 :rtype: :class:`~oci.response.Response` 11688 11689 :example: 11690 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_vcn_dns_resolver_association.py.html>`__ to see an example of how to use get_vcn_dns_resolver_association API. 11691 """ 11692 resource_path = "/vcns/{vcnId}/dnsResolverAssociation" 11693 method = "GET" 11694 11695 # Don't accept unknown kwargs 11696 expected_kwargs = [ 11697 "retry_strategy", 11698 "opc_request_id" 11699 ] 11700 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11701 if extra_kwargs: 11702 raise ValueError( 11703 "get_vcn_dns_resolver_association got unknown kwargs: {!r}".format(extra_kwargs)) 11704 11705 path_params = { 11706 "vcnId": vcn_id 11707 } 11708 11709 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11710 11711 for (k, v) in six.iteritems(path_params): 11712 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11713 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11714 11715 header_params = { 11716 "accept": "application/json", 11717 "content-type": "application/json", 11718 "opc-request-id": kwargs.get("opc_request_id", missing) 11719 } 11720 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11721 11722 retry_strategy = self.base_client.get_preferred_retry_strategy( 11723 operation_retry_strategy=kwargs.get('retry_strategy'), 11724 client_retry_strategy=self.retry_strategy 11725 ) 11726 11727 if retry_strategy: 11728 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11729 self.base_client.add_opc_client_retries_header(header_params) 11730 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11731 return retry_strategy.make_retrying_call( 11732 self.base_client.call_api, 11733 resource_path=resource_path, 11734 method=method, 11735 path_params=path_params, 11736 header_params=header_params, 11737 response_type="VcnDnsResolverAssociation") 11738 else: 11739 return self.base_client.call_api( 11740 resource_path=resource_path, 11741 method=method, 11742 path_params=path_params, 11743 header_params=header_params, 11744 response_type="VcnDnsResolverAssociation") 11745 11746 def get_vcn_topology(self, compartment_id, vcn_id, **kwargs): 11747 """ 11748 Gets a virtual network topology for a given VCN. 11749 11750 11751 :param str compartment_id: (required) 11752 The `OCID`__ of the compartment. 11753 11754 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 11755 11756 :param str vcn_id: (required) 11757 The `OCID`__ of the VCN. 11758 11759 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 11760 11761 :param str access_level: (optional) 11762 Valid values are `ANY` and `ACCESSIBLE`. The default is `ANY`. 11763 Setting this to `ACCESSIBLE` returns only compartments for which a 11764 user has INSPECT permissions, either directly or indirectly (permissions can be on a 11765 resource in a subcompartment). A restricted set of fields is returned for compartments in which a user has 11766 indirect INSPECT permissions. 11767 11768 When set to `ANY` permissions are not checked. 11769 11770 Allowed values are: "ANY", "ACCESSIBLE" 11771 11772 :param bool query_compartment_subtree: (optional) 11773 When set to true, the hierarchy of compartments is traversed 11774 and the specified compartment and its subcompartments are 11775 inspected depending on the the setting of `accessLevel`. 11776 Default is false. 11777 11778 :param str opc_request_id: (optional) 11779 Unique identifier for the request. 11780 If you need to contact Oracle about a particular request, please provide the request ID. 11781 11782 :param str if_none_match: (optional) 11783 For querying if there is a cached value on the server. The If-None-Match HTTP request header 11784 makes the request conditional. For GET and HEAD methods, the server will send back the requested 11785 resource, with a 200 status, only if it doesn't have an ETag matching the given ones. 11786 For other methods, the request will be processed only if the eventually existing resource's 11787 ETag doesn't match any of the values listed. 11788 11789 :param str cache_control: (optional) 11790 The Cache-Control HTTP header holds directives (instructions) 11791 for caching in both requests and responses. 11792 11793 :param obj retry_strategy: (optional) 11794 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11795 11796 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. 11797 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11798 11799 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11800 11801 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VcnTopology` 11802 :rtype: :class:`~oci.response.Response` 11803 11804 :example: 11805 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_vcn_topology.py.html>`__ to see an example of how to use get_vcn_topology API. 11806 """ 11807 resource_path = "/vcnTopology" 11808 method = "GET" 11809 11810 # Don't accept unknown kwargs 11811 expected_kwargs = [ 11812 "retry_strategy", 11813 "access_level", 11814 "query_compartment_subtree", 11815 "opc_request_id", 11816 "if_none_match", 11817 "cache_control" 11818 ] 11819 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11820 if extra_kwargs: 11821 raise ValueError( 11822 "get_vcn_topology got unknown kwargs: {!r}".format(extra_kwargs)) 11823 11824 if 'access_level' in kwargs: 11825 access_level_allowed_values = ["ANY", "ACCESSIBLE"] 11826 if kwargs['access_level'] not in access_level_allowed_values: 11827 raise ValueError( 11828 "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) 11829 ) 11830 11831 query_params = { 11832 "compartmentId": compartment_id, 11833 "accessLevel": kwargs.get("access_level", missing), 11834 "queryCompartmentSubtree": kwargs.get("query_compartment_subtree", missing), 11835 "vcnId": vcn_id 11836 } 11837 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 11838 11839 header_params = { 11840 "accept": "application/json", 11841 "content-type": "application/json", 11842 "opc-request-id": kwargs.get("opc_request_id", missing), 11843 "if-none-match": kwargs.get("if_none_match", missing), 11844 "cache-control": kwargs.get("cache_control", missing) 11845 } 11846 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11847 11848 retry_strategy = self.base_client.get_preferred_retry_strategy( 11849 operation_retry_strategy=kwargs.get('retry_strategy'), 11850 client_retry_strategy=self.retry_strategy 11851 ) 11852 11853 if retry_strategy: 11854 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11855 self.base_client.add_opc_client_retries_header(header_params) 11856 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11857 return retry_strategy.make_retrying_call( 11858 self.base_client.call_api, 11859 resource_path=resource_path, 11860 method=method, 11861 query_params=query_params, 11862 header_params=header_params, 11863 response_type="VcnTopology") 11864 else: 11865 return self.base_client.call_api( 11866 resource_path=resource_path, 11867 method=method, 11868 query_params=query_params, 11869 header_params=header_params, 11870 response_type="VcnTopology") 11871 11872 def get_virtual_circuit(self, virtual_circuit_id, **kwargs): 11873 """ 11874 Gets the specified virtual circuit's information. 11875 11876 11877 :param str virtual_circuit_id: (required) 11878 The `OCID`__ of the virtual circuit. 11879 11880 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 11881 11882 :param obj retry_strategy: (optional) 11883 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11884 11885 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. 11886 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11887 11888 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11889 11890 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VirtualCircuit` 11891 :rtype: :class:`~oci.response.Response` 11892 11893 :example: 11894 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_virtual_circuit.py.html>`__ to see an example of how to use get_virtual_circuit API. 11895 """ 11896 resource_path = "/virtualCircuits/{virtualCircuitId}" 11897 method = "GET" 11898 11899 expected_kwargs = ["retry_strategy"] 11900 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11901 if extra_kwargs: 11902 raise ValueError( 11903 "get_virtual_circuit got unknown kwargs: {!r}".format(extra_kwargs)) 11904 11905 path_params = { 11906 "virtualCircuitId": virtual_circuit_id 11907 } 11908 11909 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11910 11911 for (k, v) in six.iteritems(path_params): 11912 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11913 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11914 11915 header_params = { 11916 "accept": "application/json", 11917 "content-type": "application/json" 11918 } 11919 11920 retry_strategy = self.base_client.get_preferred_retry_strategy( 11921 operation_retry_strategy=kwargs.get('retry_strategy'), 11922 client_retry_strategy=self.retry_strategy 11923 ) 11924 11925 if retry_strategy: 11926 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11927 self.base_client.add_opc_client_retries_header(header_params) 11928 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11929 return retry_strategy.make_retrying_call( 11930 self.base_client.call_api, 11931 resource_path=resource_path, 11932 method=method, 11933 path_params=path_params, 11934 header_params=header_params, 11935 response_type="VirtualCircuit") 11936 else: 11937 return self.base_client.call_api( 11938 resource_path=resource_path, 11939 method=method, 11940 path_params=path_params, 11941 header_params=header_params, 11942 response_type="VirtualCircuit") 11943 11944 def get_vlan(self, vlan_id, **kwargs): 11945 """ 11946 Gets the specified VLAN's information. 11947 11948 11949 :param str vlan_id: (required) 11950 The `OCID`__ of the VLAN. 11951 11952 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 11953 11954 :param str opc_request_id: (optional) 11955 Unique identifier for the request. 11956 If you need to contact Oracle about a particular request, please provide the request ID. 11957 11958 :param obj retry_strategy: (optional) 11959 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11960 11961 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. 11962 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11963 11964 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11965 11966 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vlan` 11967 :rtype: :class:`~oci.response.Response` 11968 11969 :example: 11970 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_vlan.py.html>`__ to see an example of how to use get_vlan API. 11971 """ 11972 resource_path = "/vlans/{vlanId}" 11973 method = "GET" 11974 11975 # Don't accept unknown kwargs 11976 expected_kwargs = [ 11977 "retry_strategy", 11978 "opc_request_id" 11979 ] 11980 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11981 if extra_kwargs: 11982 raise ValueError( 11983 "get_vlan got unknown kwargs: {!r}".format(extra_kwargs)) 11984 11985 path_params = { 11986 "vlanId": vlan_id 11987 } 11988 11989 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11990 11991 for (k, v) in six.iteritems(path_params): 11992 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11993 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11994 11995 header_params = { 11996 "accept": "application/json", 11997 "content-type": "application/json", 11998 "opc-request-id": kwargs.get("opc_request_id", missing) 11999 } 12000 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12001 12002 retry_strategy = self.base_client.get_preferred_retry_strategy( 12003 operation_retry_strategy=kwargs.get('retry_strategy'), 12004 client_retry_strategy=self.retry_strategy 12005 ) 12006 12007 if retry_strategy: 12008 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12009 self.base_client.add_opc_client_retries_header(header_params) 12010 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12011 return retry_strategy.make_retrying_call( 12012 self.base_client.call_api, 12013 resource_path=resource_path, 12014 method=method, 12015 path_params=path_params, 12016 header_params=header_params, 12017 response_type="Vlan") 12018 else: 12019 return self.base_client.call_api( 12020 resource_path=resource_path, 12021 method=method, 12022 path_params=path_params, 12023 header_params=header_params, 12024 response_type="Vlan") 12025 12026 def get_vnic(self, vnic_id, **kwargs): 12027 """ 12028 Gets the information for the specified virtual network interface card (VNIC). 12029 You can get the VNIC `OCID`__ from the 12030 :func:`list_vnic_attachments` 12031 operation. 12032 12033 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 12034 12035 12036 :param str vnic_id: (required) 12037 The `OCID`__ of the VNIC. 12038 12039 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 12040 12041 :param obj retry_strategy: (optional) 12042 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12043 12044 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. 12045 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12046 12047 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12048 12049 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vnic` 12050 :rtype: :class:`~oci.response.Response` 12051 12052 :example: 12053 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_vnic.py.html>`__ to see an example of how to use get_vnic API. 12054 """ 12055 resource_path = "/vnics/{vnicId}" 12056 method = "GET" 12057 12058 expected_kwargs = ["retry_strategy"] 12059 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12060 if extra_kwargs: 12061 raise ValueError( 12062 "get_vnic got unknown kwargs: {!r}".format(extra_kwargs)) 12063 12064 path_params = { 12065 "vnicId": vnic_id 12066 } 12067 12068 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 12069 12070 for (k, v) in six.iteritems(path_params): 12071 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 12072 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 12073 12074 header_params = { 12075 "accept": "application/json", 12076 "content-type": "application/json" 12077 } 12078 12079 retry_strategy = self.base_client.get_preferred_retry_strategy( 12080 operation_retry_strategy=kwargs.get('retry_strategy'), 12081 client_retry_strategy=self.retry_strategy 12082 ) 12083 12084 if retry_strategy: 12085 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12086 self.base_client.add_opc_client_retries_header(header_params) 12087 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12088 return retry_strategy.make_retrying_call( 12089 self.base_client.call_api, 12090 resource_path=resource_path, 12091 method=method, 12092 path_params=path_params, 12093 header_params=header_params, 12094 response_type="Vnic") 12095 else: 12096 return self.base_client.call_api( 12097 resource_path=resource_path, 12098 method=method, 12099 path_params=path_params, 12100 header_params=header_params, 12101 response_type="Vnic") 12102 12103 def list_allowed_peer_regions_for_remote_peering(self, **kwargs): 12104 """ 12105 Lists the regions that support remote VCN peering (which is peering across regions). 12106 For more information, see `VCN Peering`__. 12107 12108 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm 12109 12110 12111 :param obj retry_strategy: (optional) 12112 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12113 12114 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. 12115 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12116 12117 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12118 12119 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.PeerRegionForRemotePeering` 12120 :rtype: :class:`~oci.response.Response` 12121 12122 :example: 12123 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_allowed_peer_regions_for_remote_peering.py.html>`__ to see an example of how to use list_allowed_peer_regions_for_remote_peering API. 12124 """ 12125 resource_path = "/allowedPeerRegionsForRemotePeering" 12126 method = "GET" 12127 12128 expected_kwargs = ["retry_strategy"] 12129 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12130 if extra_kwargs: 12131 raise ValueError( 12132 "list_allowed_peer_regions_for_remote_peering got unknown kwargs: {!r}".format(extra_kwargs)) 12133 12134 header_params = { 12135 "accept": "application/json", 12136 "content-type": "application/json" 12137 } 12138 12139 retry_strategy = self.base_client.get_preferred_retry_strategy( 12140 operation_retry_strategy=kwargs.get('retry_strategy'), 12141 client_retry_strategy=self.retry_strategy 12142 ) 12143 12144 if retry_strategy: 12145 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12146 self.base_client.add_opc_client_retries_header(header_params) 12147 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12148 return retry_strategy.make_retrying_call( 12149 self.base_client.call_api, 12150 resource_path=resource_path, 12151 method=method, 12152 header_params=header_params, 12153 response_type="list[PeerRegionForRemotePeering]") 12154 else: 12155 return self.base_client.call_api( 12156 resource_path=resource_path, 12157 method=method, 12158 header_params=header_params, 12159 response_type="list[PeerRegionForRemotePeering]") 12160 12161 def list_byoip_allocated_ranges(self, byoip_range_id, **kwargs): 12162 """ 12163 Lists the subranges of a BYOIP CIDR block currently allocated to an IP pool. 12164 Each `ByoipAllocatedRange` object also lists the IP pool where it is allocated. 12165 12166 12167 :param str byoip_range_id: (required) 12168 The `OCID`__ of the `ByoipRange` resource containing the BYOIP CIDR block. 12169 12170 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 12171 12172 :param str opc_request_id: (optional) 12173 Unique identifier for the request. 12174 If you need to contact Oracle about a particular request, please provide the request ID. 12175 12176 :param int limit: (optional) 12177 For list pagination. The maximum number of results per page, or items to return in a paginated 12178 \"List\" call. For important details about how pagination works, see 12179 `List Pagination`__. 12180 12181 Example: `50` 12182 12183 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12184 12185 :param str page: (optional) 12186 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 12187 call. For important details about how pagination works, see 12188 `List Pagination`__. 12189 12190 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12191 12192 :param obj retry_strategy: (optional) 12193 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12194 12195 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. 12196 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12197 12198 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12199 12200 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipAllocatedRangeCollection` 12201 :rtype: :class:`~oci.response.Response` 12202 12203 :example: 12204 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_byoip_allocated_ranges.py.html>`__ to see an example of how to use list_byoip_allocated_ranges API. 12205 """ 12206 resource_path = "/byoipRanges/{byoipRangeId}/byoipAllocatedRanges" 12207 method = "GET" 12208 12209 # Don't accept unknown kwargs 12210 expected_kwargs = [ 12211 "retry_strategy", 12212 "opc_request_id", 12213 "limit", 12214 "page" 12215 ] 12216 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12217 if extra_kwargs: 12218 raise ValueError( 12219 "list_byoip_allocated_ranges got unknown kwargs: {!r}".format(extra_kwargs)) 12220 12221 path_params = { 12222 "byoipRangeId": byoip_range_id 12223 } 12224 12225 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 12226 12227 for (k, v) in six.iteritems(path_params): 12228 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 12229 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 12230 12231 query_params = { 12232 "limit": kwargs.get("limit", missing), 12233 "page": kwargs.get("page", missing) 12234 } 12235 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12236 12237 header_params = { 12238 "accept": "application/json", 12239 "content-type": "application/json", 12240 "opc-request-id": kwargs.get("opc_request_id", missing) 12241 } 12242 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12243 12244 retry_strategy = self.base_client.get_preferred_retry_strategy( 12245 operation_retry_strategy=kwargs.get('retry_strategy'), 12246 client_retry_strategy=self.retry_strategy 12247 ) 12248 12249 if retry_strategy: 12250 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12251 self.base_client.add_opc_client_retries_header(header_params) 12252 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12253 return retry_strategy.make_retrying_call( 12254 self.base_client.call_api, 12255 resource_path=resource_path, 12256 method=method, 12257 path_params=path_params, 12258 query_params=query_params, 12259 header_params=header_params, 12260 response_type="ByoipAllocatedRangeCollection") 12261 else: 12262 return self.base_client.call_api( 12263 resource_path=resource_path, 12264 method=method, 12265 path_params=path_params, 12266 query_params=query_params, 12267 header_params=header_params, 12268 response_type="ByoipAllocatedRangeCollection") 12269 12270 def list_byoip_ranges(self, compartment_id, **kwargs): 12271 """ 12272 Lists the `ByoipRange` resources in the specified compartment. 12273 You can filter the list using query parameters. 12274 12275 12276 :param str compartment_id: (required) 12277 The `OCID`__ of the compartment. 12278 12279 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 12280 12281 :param str opc_request_id: (optional) 12282 Unique identifier for the request. 12283 If you need to contact Oracle about a particular request, please provide the request ID. 12284 12285 :param int limit: (optional) 12286 For list pagination. The maximum number of results per page, or items to return in a paginated 12287 \"List\" call. For important details about how pagination works, see 12288 `List Pagination`__. 12289 12290 Example: `50` 12291 12292 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12293 12294 :param str page: (optional) 12295 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 12296 call. For important details about how pagination works, see 12297 `List Pagination`__. 12298 12299 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12300 12301 :param str display_name: (optional) 12302 A filter to return only resources that match the given display name exactly. 12303 12304 :param str lifecycle_state: (optional) 12305 A filter to return only resources that match the given lifecycle state name exactly. 12306 12307 :param str sort_by: (optional) 12308 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 12309 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 12310 sort order is case sensitive. 12311 12312 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 12313 optionally filter by availability domain if the scope of the resource type is within a 12314 single availability domain. If you call one of these \"List\" operations without specifying 12315 an availability domain, the resources are grouped by availability domain, then sorted. 12316 12317 Allowed values are: "TIMECREATED", "DISPLAYNAME" 12318 12319 :param str sort_order: (optional) 12320 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 12321 is case sensitive. 12322 12323 Allowed values are: "ASC", "DESC" 12324 12325 :param obj retry_strategy: (optional) 12326 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12327 12328 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. 12329 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12330 12331 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12332 12333 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipRangeCollection` 12334 :rtype: :class:`~oci.response.Response` 12335 12336 :example: 12337 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_byoip_ranges.py.html>`__ to see an example of how to use list_byoip_ranges API. 12338 """ 12339 resource_path = "/byoipRanges" 12340 method = "GET" 12341 12342 # Don't accept unknown kwargs 12343 expected_kwargs = [ 12344 "retry_strategy", 12345 "opc_request_id", 12346 "limit", 12347 "page", 12348 "display_name", 12349 "lifecycle_state", 12350 "sort_by", 12351 "sort_order" 12352 ] 12353 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12354 if extra_kwargs: 12355 raise ValueError( 12356 "list_byoip_ranges got unknown kwargs: {!r}".format(extra_kwargs)) 12357 12358 if 'sort_by' in kwargs: 12359 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 12360 if kwargs['sort_by'] not in sort_by_allowed_values: 12361 raise ValueError( 12362 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 12363 ) 12364 12365 if 'sort_order' in kwargs: 12366 sort_order_allowed_values = ["ASC", "DESC"] 12367 if kwargs['sort_order'] not in sort_order_allowed_values: 12368 raise ValueError( 12369 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 12370 ) 12371 12372 query_params = { 12373 "limit": kwargs.get("limit", missing), 12374 "page": kwargs.get("page", missing), 12375 "displayName": kwargs.get("display_name", missing), 12376 "lifecycleState": kwargs.get("lifecycle_state", missing), 12377 "sortBy": kwargs.get("sort_by", missing), 12378 "sortOrder": kwargs.get("sort_order", missing), 12379 "compartmentId": compartment_id 12380 } 12381 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12382 12383 header_params = { 12384 "accept": "application/json", 12385 "content-type": "application/json", 12386 "opc-request-id": kwargs.get("opc_request_id", missing) 12387 } 12388 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12389 12390 retry_strategy = self.base_client.get_preferred_retry_strategy( 12391 operation_retry_strategy=kwargs.get('retry_strategy'), 12392 client_retry_strategy=self.retry_strategy 12393 ) 12394 12395 if retry_strategy: 12396 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12397 self.base_client.add_opc_client_retries_header(header_params) 12398 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12399 return retry_strategy.make_retrying_call( 12400 self.base_client.call_api, 12401 resource_path=resource_path, 12402 method=method, 12403 query_params=query_params, 12404 header_params=header_params, 12405 response_type="ByoipRangeCollection") 12406 else: 12407 return self.base_client.call_api( 12408 resource_path=resource_path, 12409 method=method, 12410 query_params=query_params, 12411 header_params=header_params, 12412 response_type="ByoipRangeCollection") 12413 12414 def list_cpe_device_shapes(self, **kwargs): 12415 """ 12416 Lists the CPE device types that the Networking service provides CPE configuration 12417 content for (example: Cisco ASA). The content helps a network engineer configure 12418 the actual CPE device represented by a :class:`Cpe` object. 12419 12420 If you want to generate CPE configuration content for one of the returned CPE device types, 12421 ensure that the :class:`Cpe` object's `cpeDeviceShapeId` attribute is set 12422 to the CPE device type's `OCID`__ (returned by this operation). 12423 12424 For information about generating CPE configuration content, see these operations: 12425 12426 * :func:`get_cpe_device_config_content` 12427 * :func:`get_ipsec_cpe_device_config_content` 12428 * :func:`get_tunnel_cpe_device_config_content` 12429 12430 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 12431 12432 12433 :param int limit: (optional) 12434 For list pagination. The maximum number of results per page, or items to return in a paginated 12435 \"List\" call. For important details about how pagination works, see 12436 `List Pagination`__. 12437 12438 Example: `50` 12439 12440 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12441 12442 :param str page: (optional) 12443 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 12444 call. For important details about how pagination works, see 12445 `List Pagination`__. 12446 12447 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12448 12449 :param str opc_request_id: (optional) 12450 Unique identifier for the request. 12451 If you need to contact Oracle about a particular request, please provide the request ID. 12452 12453 :param obj retry_strategy: (optional) 12454 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12455 12456 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. 12457 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12458 12459 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12460 12461 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.CpeDeviceShapeSummary` 12462 :rtype: :class:`~oci.response.Response` 12463 12464 :example: 12465 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_cpe_device_shapes.py.html>`__ to see an example of how to use list_cpe_device_shapes API. 12466 """ 12467 resource_path = "/cpeDeviceShapes" 12468 method = "GET" 12469 12470 # Don't accept unknown kwargs 12471 expected_kwargs = [ 12472 "retry_strategy", 12473 "limit", 12474 "page", 12475 "opc_request_id" 12476 ] 12477 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12478 if extra_kwargs: 12479 raise ValueError( 12480 "list_cpe_device_shapes got unknown kwargs: {!r}".format(extra_kwargs)) 12481 12482 query_params = { 12483 "limit": kwargs.get("limit", missing), 12484 "page": kwargs.get("page", missing) 12485 } 12486 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12487 12488 header_params = { 12489 "accept": "application/json", 12490 "content-type": "application/json", 12491 "opc-request-id": kwargs.get("opc_request_id", missing) 12492 } 12493 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12494 12495 retry_strategy = self.base_client.get_preferred_retry_strategy( 12496 operation_retry_strategy=kwargs.get('retry_strategy'), 12497 client_retry_strategy=self.retry_strategy 12498 ) 12499 12500 if retry_strategy: 12501 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12502 self.base_client.add_opc_client_retries_header(header_params) 12503 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12504 return retry_strategy.make_retrying_call( 12505 self.base_client.call_api, 12506 resource_path=resource_path, 12507 method=method, 12508 query_params=query_params, 12509 header_params=header_params, 12510 response_type="list[CpeDeviceShapeSummary]") 12511 else: 12512 return self.base_client.call_api( 12513 resource_path=resource_path, 12514 method=method, 12515 query_params=query_params, 12516 header_params=header_params, 12517 response_type="list[CpeDeviceShapeSummary]") 12518 12519 def list_cpes(self, compartment_id, **kwargs): 12520 """ 12521 Lists the customer-premises equipment objects (CPEs) in the specified compartment. 12522 12523 12524 :param str compartment_id: (required) 12525 The `OCID`__ of the compartment. 12526 12527 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 12528 12529 :param int limit: (optional) 12530 For list pagination. The maximum number of results per page, or items to return in a paginated 12531 \"List\" call. For important details about how pagination works, see 12532 `List Pagination`__. 12533 12534 Example: `50` 12535 12536 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12537 12538 :param str page: (optional) 12539 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 12540 call. For important details about how pagination works, see 12541 `List Pagination`__. 12542 12543 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12544 12545 :param obj retry_strategy: (optional) 12546 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12547 12548 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. 12549 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12550 12551 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12552 12553 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Cpe` 12554 :rtype: :class:`~oci.response.Response` 12555 12556 :example: 12557 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_cpes.py.html>`__ to see an example of how to use list_cpes API. 12558 """ 12559 resource_path = "/cpes" 12560 method = "GET" 12561 12562 # Don't accept unknown kwargs 12563 expected_kwargs = [ 12564 "retry_strategy", 12565 "limit", 12566 "page" 12567 ] 12568 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12569 if extra_kwargs: 12570 raise ValueError( 12571 "list_cpes got unknown kwargs: {!r}".format(extra_kwargs)) 12572 12573 query_params = { 12574 "compartmentId": compartment_id, 12575 "limit": kwargs.get("limit", missing), 12576 "page": kwargs.get("page", missing) 12577 } 12578 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12579 12580 header_params = { 12581 "accept": "application/json", 12582 "content-type": "application/json" 12583 } 12584 12585 retry_strategy = self.base_client.get_preferred_retry_strategy( 12586 operation_retry_strategy=kwargs.get('retry_strategy'), 12587 client_retry_strategy=self.retry_strategy 12588 ) 12589 12590 if retry_strategy: 12591 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12592 self.base_client.add_opc_client_retries_header(header_params) 12593 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12594 return retry_strategy.make_retrying_call( 12595 self.base_client.call_api, 12596 resource_path=resource_path, 12597 method=method, 12598 query_params=query_params, 12599 header_params=header_params, 12600 response_type="list[Cpe]") 12601 else: 12602 return self.base_client.call_api( 12603 resource_path=resource_path, 12604 method=method, 12605 query_params=query_params, 12606 header_params=header_params, 12607 response_type="list[Cpe]") 12608 12609 def list_cross_connect_groups(self, compartment_id, **kwargs): 12610 """ 12611 Lists the cross-connect groups in the specified compartment. 12612 12613 12614 :param str compartment_id: (required) 12615 The `OCID`__ of the compartment. 12616 12617 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 12618 12619 :param int limit: (optional) 12620 For list pagination. The maximum number of results per page, or items to return in a paginated 12621 \"List\" call. For important details about how pagination works, see 12622 `List Pagination`__. 12623 12624 Example: `50` 12625 12626 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12627 12628 :param str page: (optional) 12629 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 12630 call. For important details about how pagination works, see 12631 `List Pagination`__. 12632 12633 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12634 12635 :param str display_name: (optional) 12636 A filter to return only resources that match the given display name exactly. 12637 12638 :param str sort_by: (optional) 12639 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 12640 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 12641 sort order is case sensitive. 12642 12643 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 12644 optionally filter by availability domain if the scope of the resource type is within a 12645 single availability domain. If you call one of these \"List\" operations without specifying 12646 an availability domain, the resources are grouped by availability domain, then sorted. 12647 12648 Allowed values are: "TIMECREATED", "DISPLAYNAME" 12649 12650 :param str sort_order: (optional) 12651 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 12652 is case sensitive. 12653 12654 Allowed values are: "ASC", "DESC" 12655 12656 :param str lifecycle_state: (optional) 12657 A filter to return only resources that match the specified lifecycle 12658 state. The value is case insensitive. 12659 12660 Allowed values are: "PROVISIONING", "PROVISIONED", "INACTIVE", "TERMINATING", "TERMINATED" 12661 12662 :param obj retry_strategy: (optional) 12663 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12664 12665 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. 12666 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12667 12668 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12669 12670 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.CrossConnectGroup` 12671 :rtype: :class:`~oci.response.Response` 12672 12673 :example: 12674 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_cross_connect_groups.py.html>`__ to see an example of how to use list_cross_connect_groups API. 12675 """ 12676 resource_path = "/crossConnectGroups" 12677 method = "GET" 12678 12679 # Don't accept unknown kwargs 12680 expected_kwargs = [ 12681 "retry_strategy", 12682 "limit", 12683 "page", 12684 "display_name", 12685 "sort_by", 12686 "sort_order", 12687 "lifecycle_state" 12688 ] 12689 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12690 if extra_kwargs: 12691 raise ValueError( 12692 "list_cross_connect_groups got unknown kwargs: {!r}".format(extra_kwargs)) 12693 12694 if 'sort_by' in kwargs: 12695 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 12696 if kwargs['sort_by'] not in sort_by_allowed_values: 12697 raise ValueError( 12698 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 12699 ) 12700 12701 if 'sort_order' in kwargs: 12702 sort_order_allowed_values = ["ASC", "DESC"] 12703 if kwargs['sort_order'] not in sort_order_allowed_values: 12704 raise ValueError( 12705 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 12706 ) 12707 12708 if 'lifecycle_state' in kwargs: 12709 lifecycle_state_allowed_values = ["PROVISIONING", "PROVISIONED", "INACTIVE", "TERMINATING", "TERMINATED"] 12710 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 12711 raise ValueError( 12712 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 12713 ) 12714 12715 query_params = { 12716 "compartmentId": compartment_id, 12717 "limit": kwargs.get("limit", missing), 12718 "page": kwargs.get("page", missing), 12719 "displayName": kwargs.get("display_name", missing), 12720 "sortBy": kwargs.get("sort_by", missing), 12721 "sortOrder": kwargs.get("sort_order", missing), 12722 "lifecycleState": kwargs.get("lifecycle_state", missing) 12723 } 12724 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12725 12726 header_params = { 12727 "accept": "application/json", 12728 "content-type": "application/json" 12729 } 12730 12731 retry_strategy = self.base_client.get_preferred_retry_strategy( 12732 operation_retry_strategy=kwargs.get('retry_strategy'), 12733 client_retry_strategy=self.retry_strategy 12734 ) 12735 12736 if retry_strategy: 12737 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12738 self.base_client.add_opc_client_retries_header(header_params) 12739 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12740 return retry_strategy.make_retrying_call( 12741 self.base_client.call_api, 12742 resource_path=resource_path, 12743 method=method, 12744 query_params=query_params, 12745 header_params=header_params, 12746 response_type="list[CrossConnectGroup]") 12747 else: 12748 return self.base_client.call_api( 12749 resource_path=resource_path, 12750 method=method, 12751 query_params=query_params, 12752 header_params=header_params, 12753 response_type="list[CrossConnectGroup]") 12754 12755 def list_cross_connect_locations(self, compartment_id, **kwargs): 12756 """ 12757 Lists the available FastConnect locations for cross-connect installation. You need 12758 this information so you can specify your desired location when you create a cross-connect. 12759 12760 12761 :param str compartment_id: (required) 12762 The `OCID`__ of the compartment. 12763 12764 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 12765 12766 :param int limit: (optional) 12767 For list pagination. The maximum number of results per page, or items to return in a paginated 12768 \"List\" call. For important details about how pagination works, see 12769 `List Pagination`__. 12770 12771 Example: `50` 12772 12773 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12774 12775 :param str page: (optional) 12776 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 12777 call. For important details about how pagination works, see 12778 `List Pagination`__. 12779 12780 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12781 12782 :param obj retry_strategy: (optional) 12783 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12784 12785 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. 12786 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12787 12788 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12789 12790 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.CrossConnectLocation` 12791 :rtype: :class:`~oci.response.Response` 12792 12793 :example: 12794 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_cross_connect_locations.py.html>`__ to see an example of how to use list_cross_connect_locations API. 12795 """ 12796 resource_path = "/crossConnectLocations" 12797 method = "GET" 12798 12799 # Don't accept unknown kwargs 12800 expected_kwargs = [ 12801 "retry_strategy", 12802 "limit", 12803 "page" 12804 ] 12805 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12806 if extra_kwargs: 12807 raise ValueError( 12808 "list_cross_connect_locations got unknown kwargs: {!r}".format(extra_kwargs)) 12809 12810 query_params = { 12811 "compartmentId": compartment_id, 12812 "limit": kwargs.get("limit", missing), 12813 "page": kwargs.get("page", missing) 12814 } 12815 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12816 12817 header_params = { 12818 "accept": "application/json", 12819 "content-type": "application/json" 12820 } 12821 12822 retry_strategy = self.base_client.get_preferred_retry_strategy( 12823 operation_retry_strategy=kwargs.get('retry_strategy'), 12824 client_retry_strategy=self.retry_strategy 12825 ) 12826 12827 if retry_strategy: 12828 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12829 self.base_client.add_opc_client_retries_header(header_params) 12830 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12831 return retry_strategy.make_retrying_call( 12832 self.base_client.call_api, 12833 resource_path=resource_path, 12834 method=method, 12835 query_params=query_params, 12836 header_params=header_params, 12837 response_type="list[CrossConnectLocation]") 12838 else: 12839 return self.base_client.call_api( 12840 resource_path=resource_path, 12841 method=method, 12842 query_params=query_params, 12843 header_params=header_params, 12844 response_type="list[CrossConnectLocation]") 12845 12846 def list_cross_connect_mappings(self, virtual_circuit_id, **kwargs): 12847 """ 12848 Lists the Cross Connect mapping Details for the specified 12849 virtual circuit. 12850 12851 12852 :param str virtual_circuit_id: (required) 12853 The `OCID`__ of the virtual circuit. 12854 12855 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 12856 12857 :param str opc_request_id: (optional) 12858 Unique identifier for the request. 12859 If you need to contact Oracle about a particular request, please provide the request ID. 12860 12861 :param obj retry_strategy: (optional) 12862 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12863 12864 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. 12865 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12866 12867 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12868 12869 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.CrossConnectMappingDetailsCollection` 12870 :rtype: :class:`~oci.response.Response` 12871 12872 :example: 12873 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_cross_connect_mappings.py.html>`__ to see an example of how to use list_cross_connect_mappings API. 12874 """ 12875 resource_path = "/virtualCircuits/{virtualCircuitId}/crossConnectMappings" 12876 method = "GET" 12877 12878 # Don't accept unknown kwargs 12879 expected_kwargs = [ 12880 "retry_strategy", 12881 "opc_request_id" 12882 ] 12883 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12884 if extra_kwargs: 12885 raise ValueError( 12886 "list_cross_connect_mappings got unknown kwargs: {!r}".format(extra_kwargs)) 12887 12888 path_params = { 12889 "virtualCircuitId": virtual_circuit_id 12890 } 12891 12892 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 12893 12894 for (k, v) in six.iteritems(path_params): 12895 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 12896 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 12897 12898 header_params = { 12899 "accept": "application/json", 12900 "content-type": "application/json", 12901 "opc-request-id": kwargs.get("opc_request_id", missing) 12902 } 12903 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12904 12905 retry_strategy = self.base_client.get_preferred_retry_strategy( 12906 operation_retry_strategy=kwargs.get('retry_strategy'), 12907 client_retry_strategy=self.retry_strategy 12908 ) 12909 12910 if retry_strategy: 12911 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12912 self.base_client.add_opc_client_retries_header(header_params) 12913 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12914 return retry_strategy.make_retrying_call( 12915 self.base_client.call_api, 12916 resource_path=resource_path, 12917 method=method, 12918 path_params=path_params, 12919 header_params=header_params, 12920 response_type="CrossConnectMappingDetailsCollection") 12921 else: 12922 return self.base_client.call_api( 12923 resource_path=resource_path, 12924 method=method, 12925 path_params=path_params, 12926 header_params=header_params, 12927 response_type="CrossConnectMappingDetailsCollection") 12928 12929 def list_cross_connects(self, compartment_id, **kwargs): 12930 """ 12931 Lists the cross-connects in the specified compartment. You can filter the list 12932 by specifying the `OCID`__ of a cross-connect group. 12933 12934 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 12935 12936 12937 :param str compartment_id: (required) 12938 The `OCID`__ of the compartment. 12939 12940 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 12941 12942 :param str cross_connect_group_id: (optional) 12943 The `OCID`__ of the cross-connect group. 12944 12945 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 12946 12947 :param int limit: (optional) 12948 For list pagination. The maximum number of results per page, or items to return in a paginated 12949 \"List\" call. For important details about how pagination works, see 12950 `List Pagination`__. 12951 12952 Example: `50` 12953 12954 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12955 12956 :param str page: (optional) 12957 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 12958 call. For important details about how pagination works, see 12959 `List Pagination`__. 12960 12961 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 12962 12963 :param str display_name: (optional) 12964 A filter to return only resources that match the given display name exactly. 12965 12966 :param str sort_by: (optional) 12967 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 12968 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 12969 sort order is case sensitive. 12970 12971 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 12972 optionally filter by availability domain if the scope of the resource type is within a 12973 single availability domain. If you call one of these \"List\" operations without specifying 12974 an availability domain, the resources are grouped by availability domain, then sorted. 12975 12976 Allowed values are: "TIMECREATED", "DISPLAYNAME" 12977 12978 :param str sort_order: (optional) 12979 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 12980 is case sensitive. 12981 12982 Allowed values are: "ASC", "DESC" 12983 12984 :param str lifecycle_state: (optional) 12985 A filter to return only resources that match the specified lifecycle 12986 state. The value is case insensitive. 12987 12988 Allowed values are: "PENDING_CUSTOMER", "PROVISIONING", "PROVISIONED", "INACTIVE", "TERMINATING", "TERMINATED" 12989 12990 :param obj retry_strategy: (optional) 12991 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12992 12993 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. 12994 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12995 12996 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12997 12998 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.CrossConnect` 12999 :rtype: :class:`~oci.response.Response` 13000 13001 :example: 13002 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_cross_connects.py.html>`__ to see an example of how to use list_cross_connects API. 13003 """ 13004 resource_path = "/crossConnects" 13005 method = "GET" 13006 13007 # Don't accept unknown kwargs 13008 expected_kwargs = [ 13009 "retry_strategy", 13010 "cross_connect_group_id", 13011 "limit", 13012 "page", 13013 "display_name", 13014 "sort_by", 13015 "sort_order", 13016 "lifecycle_state" 13017 ] 13018 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13019 if extra_kwargs: 13020 raise ValueError( 13021 "list_cross_connects got unknown kwargs: {!r}".format(extra_kwargs)) 13022 13023 if 'sort_by' in kwargs: 13024 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 13025 if kwargs['sort_by'] not in sort_by_allowed_values: 13026 raise ValueError( 13027 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13028 ) 13029 13030 if 'sort_order' in kwargs: 13031 sort_order_allowed_values = ["ASC", "DESC"] 13032 if kwargs['sort_order'] not in sort_order_allowed_values: 13033 raise ValueError( 13034 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13035 ) 13036 13037 if 'lifecycle_state' in kwargs: 13038 lifecycle_state_allowed_values = ["PENDING_CUSTOMER", "PROVISIONING", "PROVISIONED", "INACTIVE", "TERMINATING", "TERMINATED"] 13039 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 13040 raise ValueError( 13041 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 13042 ) 13043 13044 query_params = { 13045 "compartmentId": compartment_id, 13046 "crossConnectGroupId": kwargs.get("cross_connect_group_id", missing), 13047 "limit": kwargs.get("limit", missing), 13048 "page": kwargs.get("page", missing), 13049 "displayName": kwargs.get("display_name", missing), 13050 "sortBy": kwargs.get("sort_by", missing), 13051 "sortOrder": kwargs.get("sort_order", missing), 13052 "lifecycleState": kwargs.get("lifecycle_state", missing) 13053 } 13054 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13055 13056 header_params = { 13057 "accept": "application/json", 13058 "content-type": "application/json" 13059 } 13060 13061 retry_strategy = self.base_client.get_preferred_retry_strategy( 13062 operation_retry_strategy=kwargs.get('retry_strategy'), 13063 client_retry_strategy=self.retry_strategy 13064 ) 13065 13066 if retry_strategy: 13067 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13068 self.base_client.add_opc_client_retries_header(header_params) 13069 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13070 return retry_strategy.make_retrying_call( 13071 self.base_client.call_api, 13072 resource_path=resource_path, 13073 method=method, 13074 query_params=query_params, 13075 header_params=header_params, 13076 response_type="list[CrossConnect]") 13077 else: 13078 return self.base_client.call_api( 13079 resource_path=resource_path, 13080 method=method, 13081 query_params=query_params, 13082 header_params=header_params, 13083 response_type="list[CrossConnect]") 13084 13085 def list_crossconnect_port_speed_shapes(self, compartment_id, **kwargs): 13086 """ 13087 Lists the available port speeds for cross-connects. You need this information 13088 so you can specify your desired port speed (that is, shape) when you create a 13089 cross-connect. 13090 13091 13092 :param str compartment_id: (required) 13093 The `OCID`__ of the compartment. 13094 13095 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13096 13097 :param int limit: (optional) 13098 For list pagination. The maximum number of results per page, or items to return in a paginated 13099 \"List\" call. For important details about how pagination works, see 13100 `List Pagination`__. 13101 13102 Example: `50` 13103 13104 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13105 13106 :param str page: (optional) 13107 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 13108 call. For important details about how pagination works, see 13109 `List Pagination`__. 13110 13111 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13112 13113 :param obj retry_strategy: (optional) 13114 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13115 13116 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. 13117 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13118 13119 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13120 13121 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.CrossConnectPortSpeedShape` 13122 :rtype: :class:`~oci.response.Response` 13123 13124 :example: 13125 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_crossconnect_port_speed_shapes.py.html>`__ to see an example of how to use list_crossconnect_port_speed_shapes API. 13126 """ 13127 resource_path = "/crossConnectPortSpeedShapes" 13128 method = "GET" 13129 13130 # Don't accept unknown kwargs 13131 expected_kwargs = [ 13132 "retry_strategy", 13133 "limit", 13134 "page" 13135 ] 13136 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13137 if extra_kwargs: 13138 raise ValueError( 13139 "list_crossconnect_port_speed_shapes got unknown kwargs: {!r}".format(extra_kwargs)) 13140 13141 query_params = { 13142 "compartmentId": compartment_id, 13143 "limit": kwargs.get("limit", missing), 13144 "page": kwargs.get("page", missing) 13145 } 13146 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13147 13148 header_params = { 13149 "accept": "application/json", 13150 "content-type": "application/json" 13151 } 13152 13153 retry_strategy = self.base_client.get_preferred_retry_strategy( 13154 operation_retry_strategy=kwargs.get('retry_strategy'), 13155 client_retry_strategy=self.retry_strategy 13156 ) 13157 13158 if retry_strategy: 13159 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13160 self.base_client.add_opc_client_retries_header(header_params) 13161 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13162 return retry_strategy.make_retrying_call( 13163 self.base_client.call_api, 13164 resource_path=resource_path, 13165 method=method, 13166 query_params=query_params, 13167 header_params=header_params, 13168 response_type="list[CrossConnectPortSpeedShape]") 13169 else: 13170 return self.base_client.call_api( 13171 resource_path=resource_path, 13172 method=method, 13173 query_params=query_params, 13174 header_params=header_params, 13175 response_type="list[CrossConnectPortSpeedShape]") 13176 13177 def list_dhcp_options(self, compartment_id, **kwargs): 13178 """ 13179 Lists the sets of DHCP options in the specified VCN and specified compartment. 13180 If the VCN ID is not provided, then the list includes the sets of DHCP options from all VCNs in the specified compartment. 13181 The response includes the default set of options that automatically comes with each VCN, 13182 plus any other sets you've created. 13183 13184 13185 :param str compartment_id: (required) 13186 The `OCID`__ of the compartment. 13187 13188 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13189 13190 :param str vcn_id: (optional) 13191 The `OCID`__ of the VCN. 13192 13193 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13194 13195 :param int limit: (optional) 13196 For list pagination. The maximum number of results per page, or items to return in a paginated 13197 \"List\" call. For important details about how pagination works, see 13198 `List Pagination`__. 13199 13200 Example: `50` 13201 13202 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13203 13204 :param str page: (optional) 13205 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 13206 call. For important details about how pagination works, see 13207 `List Pagination`__. 13208 13209 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13210 13211 :param str display_name: (optional) 13212 A filter to return only resources that match the given display name exactly. 13213 13214 :param str sort_by: (optional) 13215 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 13216 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 13217 sort order is case sensitive. 13218 13219 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 13220 optionally filter by availability domain if the scope of the resource type is within a 13221 single availability domain. If you call one of these \"List\" operations without specifying 13222 an availability domain, the resources are grouped by availability domain, then sorted. 13223 13224 Allowed values are: "TIMECREATED", "DISPLAYNAME" 13225 13226 :param str sort_order: (optional) 13227 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 13228 is case sensitive. 13229 13230 Allowed values are: "ASC", "DESC" 13231 13232 :param str lifecycle_state: (optional) 13233 A filter to only return resources that match the given lifecycle 13234 state. The state value is case-insensitive. 13235 13236 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" 13237 13238 :param obj retry_strategy: (optional) 13239 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13240 13241 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. 13242 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13243 13244 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13245 13246 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DhcpOptions` 13247 :rtype: :class:`~oci.response.Response` 13248 13249 :example: 13250 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_dhcp_options.py.html>`__ to see an example of how to use list_dhcp_options API. 13251 """ 13252 resource_path = "/dhcps" 13253 method = "GET" 13254 13255 # Don't accept unknown kwargs 13256 expected_kwargs = [ 13257 "retry_strategy", 13258 "vcn_id", 13259 "limit", 13260 "page", 13261 "display_name", 13262 "sort_by", 13263 "sort_order", 13264 "lifecycle_state" 13265 ] 13266 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13267 if extra_kwargs: 13268 raise ValueError( 13269 "list_dhcp_options got unknown kwargs: {!r}".format(extra_kwargs)) 13270 13271 if 'sort_by' in kwargs: 13272 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 13273 if kwargs['sort_by'] not in sort_by_allowed_values: 13274 raise ValueError( 13275 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13276 ) 13277 13278 if 'sort_order' in kwargs: 13279 sort_order_allowed_values = ["ASC", "DESC"] 13280 if kwargs['sort_order'] not in sort_order_allowed_values: 13281 raise ValueError( 13282 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13283 ) 13284 13285 if 'lifecycle_state' in kwargs: 13286 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"] 13287 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 13288 raise ValueError( 13289 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 13290 ) 13291 13292 query_params = { 13293 "compartmentId": compartment_id, 13294 "vcnId": kwargs.get("vcn_id", missing), 13295 "limit": kwargs.get("limit", missing), 13296 "page": kwargs.get("page", missing), 13297 "displayName": kwargs.get("display_name", missing), 13298 "sortBy": kwargs.get("sort_by", missing), 13299 "sortOrder": kwargs.get("sort_order", missing), 13300 "lifecycleState": kwargs.get("lifecycle_state", missing) 13301 } 13302 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13303 13304 header_params = { 13305 "accept": "application/json", 13306 "content-type": "application/json" 13307 } 13308 13309 retry_strategy = self.base_client.get_preferred_retry_strategy( 13310 operation_retry_strategy=kwargs.get('retry_strategy'), 13311 client_retry_strategy=self.retry_strategy 13312 ) 13313 13314 if retry_strategy: 13315 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13316 self.base_client.add_opc_client_retries_header(header_params) 13317 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13318 return retry_strategy.make_retrying_call( 13319 self.base_client.call_api, 13320 resource_path=resource_path, 13321 method=method, 13322 query_params=query_params, 13323 header_params=header_params, 13324 response_type="list[DhcpOptions]") 13325 else: 13326 return self.base_client.call_api( 13327 resource_path=resource_path, 13328 method=method, 13329 query_params=query_params, 13330 header_params=header_params, 13331 response_type="list[DhcpOptions]") 13332 13333 def list_drg_attachments(self, compartment_id, **kwargs): 13334 """ 13335 Lists the `DrgAttachment` resource for the specified compartment. You can filter the 13336 results by DRG, attached network, attachment type, DRG route table or 13337 VCN route table. 13338 13339 The LIST API lists DRG attachments by attachment type. It will default to list VCN attachments, 13340 but you may request to list ALL attachments of ALL types. 13341 13342 13343 :param str compartment_id: (required) 13344 The `OCID`__ of the compartment. 13345 13346 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13347 13348 :param str vcn_id: (optional) 13349 The `OCID`__ of the VCN. 13350 13351 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13352 13353 :param str drg_id: (optional) 13354 The `OCID`__ of the DRG. 13355 13356 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13357 13358 :param int limit: (optional) 13359 For list pagination. The maximum number of results per page, or items to return in a paginated 13360 \"List\" call. For important details about how pagination works, see 13361 `List Pagination`__. 13362 13363 Example: `50` 13364 13365 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13366 13367 :param str page: (optional) 13368 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 13369 call. For important details about how pagination works, see 13370 `List Pagination`__. 13371 13372 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13373 13374 :param str network_id: (optional) 13375 The `OCID`__ of the resource (virtual circuit, VCN, IPSec tunnel, or remote peering connection) attached to the DRG. 13376 13377 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13378 13379 :param str attachment_type: (optional) 13380 The type for the network resource attached to the DRG. 13381 13382 Allowed values are: "VCN", "VIRTUAL_CIRCUIT", "REMOTE_PEERING_CONNECTION", "IPSEC_TUNNEL", "ALL" 13383 13384 :param str drg_route_table_id: (optional) 13385 The `OCID`__ of the DRG route table assigned to the DRG attachment. 13386 13387 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13388 13389 :param str display_name: (optional) 13390 A filter to return only resources that match the given display name exactly. 13391 13392 :param str sort_by: (optional) 13393 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 13394 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 13395 sort order is case sensitive. 13396 13397 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 13398 optionally filter by availability domain if the scope of the resource type is within a 13399 single availability domain. If you call one of these \"List\" operations without specifying 13400 an availability domain, the resources are grouped by availability domain, then sorted. 13401 13402 Allowed values are: "TIMECREATED", "DISPLAYNAME" 13403 13404 :param str sort_order: (optional) 13405 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 13406 is case sensitive. 13407 13408 Allowed values are: "ASC", "DESC" 13409 13410 :param str lifecycle_state: (optional) 13411 A filter to return only resources that match the specified lifecycle 13412 state. The value is case insensitive. 13413 13414 Allowed values are: "ATTACHING", "ATTACHED", "DETACHING", "DETACHED" 13415 13416 :param obj retry_strategy: (optional) 13417 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13418 13419 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. 13420 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13421 13422 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13423 13424 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgAttachment` 13425 :rtype: :class:`~oci.response.Response` 13426 13427 :example: 13428 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_drg_attachments.py.html>`__ to see an example of how to use list_drg_attachments API. 13429 """ 13430 resource_path = "/drgAttachments" 13431 method = "GET" 13432 13433 # Don't accept unknown kwargs 13434 expected_kwargs = [ 13435 "retry_strategy", 13436 "vcn_id", 13437 "drg_id", 13438 "limit", 13439 "page", 13440 "network_id", 13441 "attachment_type", 13442 "drg_route_table_id", 13443 "display_name", 13444 "sort_by", 13445 "sort_order", 13446 "lifecycle_state" 13447 ] 13448 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13449 if extra_kwargs: 13450 raise ValueError( 13451 "list_drg_attachments got unknown kwargs: {!r}".format(extra_kwargs)) 13452 13453 if 'attachment_type' in kwargs: 13454 attachment_type_allowed_values = ["VCN", "VIRTUAL_CIRCUIT", "REMOTE_PEERING_CONNECTION", "IPSEC_TUNNEL", "ALL"] 13455 if kwargs['attachment_type'] not in attachment_type_allowed_values: 13456 raise ValueError( 13457 "Invalid value for `attachment_type`, must be one of {0}".format(attachment_type_allowed_values) 13458 ) 13459 13460 if 'sort_by' in kwargs: 13461 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 13462 if kwargs['sort_by'] not in sort_by_allowed_values: 13463 raise ValueError( 13464 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13465 ) 13466 13467 if 'sort_order' in kwargs: 13468 sort_order_allowed_values = ["ASC", "DESC"] 13469 if kwargs['sort_order'] not in sort_order_allowed_values: 13470 raise ValueError( 13471 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13472 ) 13473 13474 if 'lifecycle_state' in kwargs: 13475 lifecycle_state_allowed_values = ["ATTACHING", "ATTACHED", "DETACHING", "DETACHED"] 13476 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 13477 raise ValueError( 13478 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 13479 ) 13480 13481 query_params = { 13482 "compartmentId": compartment_id, 13483 "vcnId": kwargs.get("vcn_id", missing), 13484 "drgId": kwargs.get("drg_id", missing), 13485 "limit": kwargs.get("limit", missing), 13486 "page": kwargs.get("page", missing), 13487 "networkId": kwargs.get("network_id", missing), 13488 "attachmentType": kwargs.get("attachment_type", missing), 13489 "drgRouteTableId": kwargs.get("drg_route_table_id", missing), 13490 "displayName": kwargs.get("display_name", missing), 13491 "sortBy": kwargs.get("sort_by", missing), 13492 "sortOrder": kwargs.get("sort_order", missing), 13493 "lifecycleState": kwargs.get("lifecycle_state", missing) 13494 } 13495 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13496 13497 header_params = { 13498 "accept": "application/json", 13499 "content-type": "application/json" 13500 } 13501 13502 retry_strategy = self.base_client.get_preferred_retry_strategy( 13503 operation_retry_strategy=kwargs.get('retry_strategy'), 13504 client_retry_strategy=self.retry_strategy 13505 ) 13506 13507 if retry_strategy: 13508 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13509 self.base_client.add_opc_client_retries_header(header_params) 13510 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13511 return retry_strategy.make_retrying_call( 13512 self.base_client.call_api, 13513 resource_path=resource_path, 13514 method=method, 13515 query_params=query_params, 13516 header_params=header_params, 13517 response_type="list[DrgAttachment]") 13518 else: 13519 return self.base_client.call_api( 13520 resource_path=resource_path, 13521 method=method, 13522 query_params=query_params, 13523 header_params=header_params, 13524 response_type="list[DrgAttachment]") 13525 13526 def list_drg_route_distribution_statements(self, drg_route_distribution_id, **kwargs): 13527 """ 13528 Lists the statements for the specified route distribution. 13529 13530 13531 :param str drg_route_distribution_id: (required) 13532 The `OCID`__ of the route distribution. 13533 13534 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13535 13536 :param int limit: (optional) 13537 For list pagination. The maximum number of results per page, or items to return in a paginated 13538 \"List\" call. For important details about how pagination works, see 13539 `List Pagination`__. 13540 13541 Example: `50` 13542 13543 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13544 13545 :param str page: (optional) 13546 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 13547 call. For important details about how pagination works, see 13548 `List Pagination`__. 13549 13550 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13551 13552 :param str sort_by: (optional) 13553 The field to sort by. 13554 13555 Allowed values are: "TIMECREATED" 13556 13557 :param str sort_order: (optional) 13558 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 13559 is case sensitive. 13560 13561 Allowed values are: "ASC", "DESC" 13562 13563 :param obj retry_strategy: (optional) 13564 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13565 13566 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. 13567 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13568 13569 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13570 13571 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgRouteDistributionStatement` 13572 :rtype: :class:`~oci.response.Response` 13573 13574 :example: 13575 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_drg_route_distribution_statements.py.html>`__ to see an example of how to use list_drg_route_distribution_statements API. 13576 """ 13577 resource_path = "/drgRouteDistributions/{drgRouteDistributionId}/drgRouteDistributionStatements" 13578 method = "GET" 13579 13580 # Don't accept unknown kwargs 13581 expected_kwargs = [ 13582 "retry_strategy", 13583 "limit", 13584 "page", 13585 "sort_by", 13586 "sort_order" 13587 ] 13588 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13589 if extra_kwargs: 13590 raise ValueError( 13591 "list_drg_route_distribution_statements got unknown kwargs: {!r}".format(extra_kwargs)) 13592 13593 path_params = { 13594 "drgRouteDistributionId": drg_route_distribution_id 13595 } 13596 13597 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 13598 13599 for (k, v) in six.iteritems(path_params): 13600 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 13601 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 13602 13603 if 'sort_by' in kwargs: 13604 sort_by_allowed_values = ["TIMECREATED"] 13605 if kwargs['sort_by'] not in sort_by_allowed_values: 13606 raise ValueError( 13607 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13608 ) 13609 13610 if 'sort_order' in kwargs: 13611 sort_order_allowed_values = ["ASC", "DESC"] 13612 if kwargs['sort_order'] not in sort_order_allowed_values: 13613 raise ValueError( 13614 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13615 ) 13616 13617 query_params = { 13618 "limit": kwargs.get("limit", missing), 13619 "page": kwargs.get("page", missing), 13620 "sortBy": kwargs.get("sort_by", missing), 13621 "sortOrder": kwargs.get("sort_order", missing) 13622 } 13623 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13624 13625 header_params = { 13626 "accept": "application/json", 13627 "content-type": "application/json" 13628 } 13629 13630 retry_strategy = self.base_client.get_preferred_retry_strategy( 13631 operation_retry_strategy=kwargs.get('retry_strategy'), 13632 client_retry_strategy=self.retry_strategy 13633 ) 13634 13635 if retry_strategy: 13636 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13637 self.base_client.add_opc_client_retries_header(header_params) 13638 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13639 return retry_strategy.make_retrying_call( 13640 self.base_client.call_api, 13641 resource_path=resource_path, 13642 method=method, 13643 path_params=path_params, 13644 query_params=query_params, 13645 header_params=header_params, 13646 response_type="list[DrgRouteDistributionStatement]") 13647 else: 13648 return self.base_client.call_api( 13649 resource_path=resource_path, 13650 method=method, 13651 path_params=path_params, 13652 query_params=query_params, 13653 header_params=header_params, 13654 response_type="list[DrgRouteDistributionStatement]") 13655 13656 def list_drg_route_distributions(self, drg_id, **kwargs): 13657 """ 13658 Lists the route distributions in the specified DRG. 13659 13660 To retrieve the statements in a distribution, use the 13661 ListDrgRouteDistributionStatements operation. 13662 13663 13664 :param str drg_id: (required) 13665 The `OCID`__ of the DRG. 13666 13667 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13668 13669 :param int limit: (optional) 13670 For list pagination. The maximum number of results per page, or items to return in a paginated 13671 \"List\" call. For important details about how pagination works, see 13672 `List Pagination`__. 13673 13674 Example: `50` 13675 13676 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13677 13678 :param str page: (optional) 13679 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 13680 call. For important details about how pagination works, see 13681 `List Pagination`__. 13682 13683 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13684 13685 :param str display_name: (optional) 13686 A filter to return only resources that match the given display name exactly. 13687 13688 :param str sort_by: (optional) 13689 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 13690 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 13691 sort order is case sensitive. 13692 13693 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 13694 optionally filter by availability domain if the scope of the resource type is within a 13695 single availability domain. If you call one of these \"List\" operations without specifying 13696 an availability domain, the resources are grouped by availability domain, then sorted. 13697 13698 Allowed values are: "TIMECREATED", "DISPLAYNAME" 13699 13700 :param str sort_order: (optional) 13701 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 13702 is case sensitive. 13703 13704 Allowed values are: "ASC", "DESC" 13705 13706 :param str lifecycle_state: (optional) 13707 A filter that only returns resources that match the specified lifecycle 13708 state. The value is case insensitive. 13709 13710 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" 13711 13712 :param obj retry_strategy: (optional) 13713 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13714 13715 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. 13716 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13717 13718 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13719 13720 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgRouteDistribution` 13721 :rtype: :class:`~oci.response.Response` 13722 13723 :example: 13724 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_drg_route_distributions.py.html>`__ to see an example of how to use list_drg_route_distributions API. 13725 """ 13726 resource_path = "/drgRouteDistributions" 13727 method = "GET" 13728 13729 # Don't accept unknown kwargs 13730 expected_kwargs = [ 13731 "retry_strategy", 13732 "limit", 13733 "page", 13734 "display_name", 13735 "sort_by", 13736 "sort_order", 13737 "lifecycle_state" 13738 ] 13739 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13740 if extra_kwargs: 13741 raise ValueError( 13742 "list_drg_route_distributions got unknown kwargs: {!r}".format(extra_kwargs)) 13743 13744 if 'sort_by' in kwargs: 13745 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 13746 if kwargs['sort_by'] not in sort_by_allowed_values: 13747 raise ValueError( 13748 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13749 ) 13750 13751 if 'sort_order' in kwargs: 13752 sort_order_allowed_values = ["ASC", "DESC"] 13753 if kwargs['sort_order'] not in sort_order_allowed_values: 13754 raise ValueError( 13755 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13756 ) 13757 13758 if 'lifecycle_state' in kwargs: 13759 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"] 13760 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 13761 raise ValueError( 13762 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 13763 ) 13764 13765 query_params = { 13766 "drgId": drg_id, 13767 "limit": kwargs.get("limit", missing), 13768 "page": kwargs.get("page", missing), 13769 "displayName": kwargs.get("display_name", missing), 13770 "sortBy": kwargs.get("sort_by", missing), 13771 "sortOrder": kwargs.get("sort_order", missing), 13772 "lifecycleState": kwargs.get("lifecycle_state", missing) 13773 } 13774 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13775 13776 header_params = { 13777 "accept": "application/json", 13778 "content-type": "application/json" 13779 } 13780 13781 retry_strategy = self.base_client.get_preferred_retry_strategy( 13782 operation_retry_strategy=kwargs.get('retry_strategy'), 13783 client_retry_strategy=self.retry_strategy 13784 ) 13785 13786 if retry_strategy: 13787 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13788 self.base_client.add_opc_client_retries_header(header_params) 13789 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13790 return retry_strategy.make_retrying_call( 13791 self.base_client.call_api, 13792 resource_path=resource_path, 13793 method=method, 13794 query_params=query_params, 13795 header_params=header_params, 13796 response_type="list[DrgRouteDistribution]") 13797 else: 13798 return self.base_client.call_api( 13799 resource_path=resource_path, 13800 method=method, 13801 query_params=query_params, 13802 header_params=header_params, 13803 response_type="list[DrgRouteDistribution]") 13804 13805 def list_drg_route_rules(self, drg_route_table_id, **kwargs): 13806 """ 13807 Lists the route rules in the specified DRG route table. 13808 13809 13810 :param str drg_route_table_id: (required) 13811 The `OCID`__ of the DRG route table. 13812 13813 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13814 13815 :param int limit: (optional) 13816 For list pagination. The maximum number of results per page, or items to return in a paginated 13817 \"List\" call. For important details about how pagination works, see 13818 `List Pagination`__. 13819 13820 Example: `50` 13821 13822 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13823 13824 :param str page: (optional) 13825 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 13826 call. For important details about how pagination works, see 13827 `List Pagination`__. 13828 13829 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13830 13831 :param str route_type: (optional) 13832 Static routes are specified through the DRG route table API. 13833 Dynamic routes are learned by the DRG from the DRG attachments through various routing protocols. 13834 13835 Allowed values are: "STATIC", "DYNAMIC" 13836 13837 :param obj retry_strategy: (optional) 13838 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13839 13840 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. 13841 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13842 13843 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13844 13845 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgRouteRule` 13846 :rtype: :class:`~oci.response.Response` 13847 13848 :example: 13849 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_drg_route_rules.py.html>`__ to see an example of how to use list_drg_route_rules API. 13850 """ 13851 resource_path = "/drgRouteTables/{drgRouteTableId}/drgRouteRules" 13852 method = "GET" 13853 13854 # Don't accept unknown kwargs 13855 expected_kwargs = [ 13856 "retry_strategy", 13857 "limit", 13858 "page", 13859 "route_type" 13860 ] 13861 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13862 if extra_kwargs: 13863 raise ValueError( 13864 "list_drg_route_rules got unknown kwargs: {!r}".format(extra_kwargs)) 13865 13866 path_params = { 13867 "drgRouteTableId": drg_route_table_id 13868 } 13869 13870 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 13871 13872 for (k, v) in six.iteritems(path_params): 13873 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 13874 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 13875 13876 if 'route_type' in kwargs: 13877 route_type_allowed_values = ["STATIC", "DYNAMIC"] 13878 if kwargs['route_type'] not in route_type_allowed_values: 13879 raise ValueError( 13880 "Invalid value for `route_type`, must be one of {0}".format(route_type_allowed_values) 13881 ) 13882 13883 query_params = { 13884 "limit": kwargs.get("limit", missing), 13885 "page": kwargs.get("page", missing), 13886 "routeType": kwargs.get("route_type", missing) 13887 } 13888 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13889 13890 header_params = { 13891 "accept": "application/json", 13892 "content-type": "application/json" 13893 } 13894 13895 retry_strategy = self.base_client.get_preferred_retry_strategy( 13896 operation_retry_strategy=kwargs.get('retry_strategy'), 13897 client_retry_strategy=self.retry_strategy 13898 ) 13899 13900 if retry_strategy: 13901 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13902 self.base_client.add_opc_client_retries_header(header_params) 13903 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13904 return retry_strategy.make_retrying_call( 13905 self.base_client.call_api, 13906 resource_path=resource_path, 13907 method=method, 13908 path_params=path_params, 13909 query_params=query_params, 13910 header_params=header_params, 13911 response_type="list[DrgRouteRule]") 13912 else: 13913 return self.base_client.call_api( 13914 resource_path=resource_path, 13915 method=method, 13916 path_params=path_params, 13917 query_params=query_params, 13918 header_params=header_params, 13919 response_type="list[DrgRouteRule]") 13920 13921 def list_drg_route_tables(self, drg_id, **kwargs): 13922 """ 13923 Lists the DRG route tables for the specified DRG. 13924 13925 Use the `ListDrgRouteRules` operation to retrieve the route rules in a table. 13926 13927 13928 :param str drg_id: (required) 13929 The `OCID`__ of the DRG. 13930 13931 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13932 13933 :param int limit: (optional) 13934 For list pagination. The maximum number of results per page, or items to return in a paginated 13935 \"List\" call. For important details about how pagination works, see 13936 `List Pagination`__. 13937 13938 Example: `50` 13939 13940 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13941 13942 :param str page: (optional) 13943 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 13944 call. For important details about how pagination works, see 13945 `List Pagination`__. 13946 13947 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 13948 13949 :param str display_name: (optional) 13950 A filter to return only resources that match the given display name exactly. 13951 13952 :param str sort_by: (optional) 13953 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 13954 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 13955 sort order is case sensitive. 13956 13957 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 13958 optionally filter by availability domain if the scope of the resource type is within a 13959 single availability domain. If you call one of these \"List\" operations without specifying 13960 an availability domain, the resources are grouped by availability domain, then sorted. 13961 13962 Allowed values are: "TIMECREATED", "DISPLAYNAME" 13963 13964 :param str sort_order: (optional) 13965 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 13966 is case sensitive. 13967 13968 Allowed values are: "ASC", "DESC" 13969 13970 :param str import_drg_route_distribution_id: (optional) 13971 The `OCID`__ of the import route distribution. 13972 13973 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 13974 13975 :param str lifecycle_state: (optional) 13976 A filter that only returns matches for the specified lifecycle 13977 state. The value is case insensitive. 13978 13979 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" 13980 13981 :param obj retry_strategy: (optional) 13982 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13983 13984 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. 13985 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13986 13987 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13988 13989 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgRouteTable` 13990 :rtype: :class:`~oci.response.Response` 13991 13992 :example: 13993 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_drg_route_tables.py.html>`__ to see an example of how to use list_drg_route_tables API. 13994 """ 13995 resource_path = "/drgRouteTables" 13996 method = "GET" 13997 13998 # Don't accept unknown kwargs 13999 expected_kwargs = [ 14000 "retry_strategy", 14001 "limit", 14002 "page", 14003 "display_name", 14004 "sort_by", 14005 "sort_order", 14006 "import_drg_route_distribution_id", 14007 "lifecycle_state" 14008 ] 14009 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14010 if extra_kwargs: 14011 raise ValueError( 14012 "list_drg_route_tables got unknown kwargs: {!r}".format(extra_kwargs)) 14013 14014 if 'sort_by' in kwargs: 14015 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 14016 if kwargs['sort_by'] not in sort_by_allowed_values: 14017 raise ValueError( 14018 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 14019 ) 14020 14021 if 'sort_order' in kwargs: 14022 sort_order_allowed_values = ["ASC", "DESC"] 14023 if kwargs['sort_order'] not in sort_order_allowed_values: 14024 raise ValueError( 14025 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 14026 ) 14027 14028 if 'lifecycle_state' in kwargs: 14029 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"] 14030 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 14031 raise ValueError( 14032 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 14033 ) 14034 14035 query_params = { 14036 "drgId": drg_id, 14037 "limit": kwargs.get("limit", missing), 14038 "page": kwargs.get("page", missing), 14039 "displayName": kwargs.get("display_name", missing), 14040 "sortBy": kwargs.get("sort_by", missing), 14041 "sortOrder": kwargs.get("sort_order", missing), 14042 "importDrgRouteDistributionId": kwargs.get("import_drg_route_distribution_id", missing), 14043 "lifecycleState": kwargs.get("lifecycle_state", missing) 14044 } 14045 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14046 14047 header_params = { 14048 "accept": "application/json", 14049 "content-type": "application/json" 14050 } 14051 14052 retry_strategy = self.base_client.get_preferred_retry_strategy( 14053 operation_retry_strategy=kwargs.get('retry_strategy'), 14054 client_retry_strategy=self.retry_strategy 14055 ) 14056 14057 if retry_strategy: 14058 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14059 self.base_client.add_opc_client_retries_header(header_params) 14060 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14061 return retry_strategy.make_retrying_call( 14062 self.base_client.call_api, 14063 resource_path=resource_path, 14064 method=method, 14065 query_params=query_params, 14066 header_params=header_params, 14067 response_type="list[DrgRouteTable]") 14068 else: 14069 return self.base_client.call_api( 14070 resource_path=resource_path, 14071 method=method, 14072 query_params=query_params, 14073 header_params=header_params, 14074 response_type="list[DrgRouteTable]") 14075 14076 def list_drgs(self, compartment_id, **kwargs): 14077 """ 14078 Lists the DRGs in the specified compartment. 14079 14080 14081 :param str compartment_id: (required) 14082 The `OCID`__ of the compartment. 14083 14084 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14085 14086 :param int limit: (optional) 14087 For list pagination. The maximum number of results per page, or items to return in a paginated 14088 \"List\" call. For important details about how pagination works, see 14089 `List Pagination`__. 14090 14091 Example: `50` 14092 14093 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14094 14095 :param str page: (optional) 14096 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 14097 call. For important details about how pagination works, see 14098 `List Pagination`__. 14099 14100 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14101 14102 :param obj retry_strategy: (optional) 14103 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14104 14105 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. 14106 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14107 14108 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14109 14110 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Drg` 14111 :rtype: :class:`~oci.response.Response` 14112 14113 :example: 14114 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_drgs.py.html>`__ to see an example of how to use list_drgs API. 14115 """ 14116 resource_path = "/drgs" 14117 method = "GET" 14118 14119 # Don't accept unknown kwargs 14120 expected_kwargs = [ 14121 "retry_strategy", 14122 "limit", 14123 "page" 14124 ] 14125 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14126 if extra_kwargs: 14127 raise ValueError( 14128 "list_drgs got unknown kwargs: {!r}".format(extra_kwargs)) 14129 14130 query_params = { 14131 "compartmentId": compartment_id, 14132 "limit": kwargs.get("limit", missing), 14133 "page": kwargs.get("page", missing) 14134 } 14135 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14136 14137 header_params = { 14138 "accept": "application/json", 14139 "content-type": "application/json" 14140 } 14141 14142 retry_strategy = self.base_client.get_preferred_retry_strategy( 14143 operation_retry_strategy=kwargs.get('retry_strategy'), 14144 client_retry_strategy=self.retry_strategy 14145 ) 14146 14147 if retry_strategy: 14148 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14149 self.base_client.add_opc_client_retries_header(header_params) 14150 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14151 return retry_strategy.make_retrying_call( 14152 self.base_client.call_api, 14153 resource_path=resource_path, 14154 method=method, 14155 query_params=query_params, 14156 header_params=header_params, 14157 response_type="list[Drg]") 14158 else: 14159 return self.base_client.call_api( 14160 resource_path=resource_path, 14161 method=method, 14162 query_params=query_params, 14163 header_params=header_params, 14164 response_type="list[Drg]") 14165 14166 def list_fast_connect_provider_services(self, compartment_id, **kwargs): 14167 """ 14168 Lists the service offerings from supported providers. You need this 14169 information so you can specify your desired provider and service 14170 offering when you create a virtual circuit. 14171 14172 For the compartment ID, provide the `OCID`__ of your tenancy (the root compartment). 14173 14174 For more information, see `FastConnect Overview`__. 14175 14176 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 14177 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm 14178 14179 14180 :param str compartment_id: (required) 14181 The `OCID`__ of the compartment. 14182 14183 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14184 14185 :param int limit: (optional) 14186 For list pagination. The maximum number of results per page, or items to return in a paginated 14187 \"List\" call. For important details about how pagination works, see 14188 `List Pagination`__. 14189 14190 Example: `50` 14191 14192 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14193 14194 :param str page: (optional) 14195 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 14196 call. For important details about how pagination works, see 14197 `List Pagination`__. 14198 14199 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14200 14201 :param obj retry_strategy: (optional) 14202 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14203 14204 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. 14205 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14206 14207 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14208 14209 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.FastConnectProviderService` 14210 :rtype: :class:`~oci.response.Response` 14211 14212 :example: 14213 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_fast_connect_provider_services.py.html>`__ to see an example of how to use list_fast_connect_provider_services API. 14214 """ 14215 resource_path = "/fastConnectProviderServices" 14216 method = "GET" 14217 14218 # Don't accept unknown kwargs 14219 expected_kwargs = [ 14220 "retry_strategy", 14221 "limit", 14222 "page" 14223 ] 14224 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14225 if extra_kwargs: 14226 raise ValueError( 14227 "list_fast_connect_provider_services got unknown kwargs: {!r}".format(extra_kwargs)) 14228 14229 query_params = { 14230 "compartmentId": compartment_id, 14231 "limit": kwargs.get("limit", missing), 14232 "page": kwargs.get("page", missing) 14233 } 14234 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14235 14236 header_params = { 14237 "accept": "application/json", 14238 "content-type": "application/json" 14239 } 14240 14241 retry_strategy = self.base_client.get_preferred_retry_strategy( 14242 operation_retry_strategy=kwargs.get('retry_strategy'), 14243 client_retry_strategy=self.retry_strategy 14244 ) 14245 14246 if retry_strategy: 14247 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14248 self.base_client.add_opc_client_retries_header(header_params) 14249 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14250 return retry_strategy.make_retrying_call( 14251 self.base_client.call_api, 14252 resource_path=resource_path, 14253 method=method, 14254 query_params=query_params, 14255 header_params=header_params, 14256 response_type="list[FastConnectProviderService]") 14257 else: 14258 return self.base_client.call_api( 14259 resource_path=resource_path, 14260 method=method, 14261 query_params=query_params, 14262 header_params=header_params, 14263 response_type="list[FastConnectProviderService]") 14264 14265 def list_fast_connect_provider_virtual_circuit_bandwidth_shapes(self, provider_service_id, **kwargs): 14266 """ 14267 Gets the list of available virtual circuit bandwidth levels for a provider. 14268 You need this information so you can specify your desired bandwidth level (shape) when you create a virtual circuit. 14269 14270 For more information about virtual circuits, see `FastConnect Overview`__. 14271 14272 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm 14273 14274 14275 :param str provider_service_id: (required) 14276 The `OCID`__ of the provider service. 14277 14278 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 14279 14280 :param int limit: (optional) 14281 For list pagination. The maximum number of results per page, or items to return in a paginated 14282 \"List\" call. For important details about how pagination works, see 14283 `List Pagination`__. 14284 14285 Example: `50` 14286 14287 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14288 14289 :param str page: (optional) 14290 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 14291 call. For important details about how pagination works, see 14292 `List Pagination`__. 14293 14294 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14295 14296 :param obj retry_strategy: (optional) 14297 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14298 14299 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. 14300 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14301 14302 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14303 14304 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.VirtualCircuitBandwidthShape` 14305 :rtype: :class:`~oci.response.Response` 14306 14307 :example: 14308 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes.py.html>`__ to see an example of how to use list_fast_connect_provider_virtual_circuit_bandwidth_shapes API. 14309 """ 14310 resource_path = "/fastConnectProviderServices/{providerServiceId}/virtualCircuitBandwidthShapes" 14311 method = "GET" 14312 14313 # Don't accept unknown kwargs 14314 expected_kwargs = [ 14315 "retry_strategy", 14316 "limit", 14317 "page" 14318 ] 14319 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14320 if extra_kwargs: 14321 raise ValueError( 14322 "list_fast_connect_provider_virtual_circuit_bandwidth_shapes got unknown kwargs: {!r}".format(extra_kwargs)) 14323 14324 path_params = { 14325 "providerServiceId": provider_service_id 14326 } 14327 14328 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14329 14330 for (k, v) in six.iteritems(path_params): 14331 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14332 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14333 14334 query_params = { 14335 "limit": kwargs.get("limit", missing), 14336 "page": kwargs.get("page", missing) 14337 } 14338 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14339 14340 header_params = { 14341 "accept": "application/json", 14342 "content-type": "application/json" 14343 } 14344 14345 retry_strategy = self.base_client.get_preferred_retry_strategy( 14346 operation_retry_strategy=kwargs.get('retry_strategy'), 14347 client_retry_strategy=self.retry_strategy 14348 ) 14349 14350 if retry_strategy: 14351 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14352 self.base_client.add_opc_client_retries_header(header_params) 14353 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14354 return retry_strategy.make_retrying_call( 14355 self.base_client.call_api, 14356 resource_path=resource_path, 14357 method=method, 14358 path_params=path_params, 14359 query_params=query_params, 14360 header_params=header_params, 14361 response_type="list[VirtualCircuitBandwidthShape]") 14362 else: 14363 return self.base_client.call_api( 14364 resource_path=resource_path, 14365 method=method, 14366 path_params=path_params, 14367 query_params=query_params, 14368 header_params=header_params, 14369 response_type="list[VirtualCircuitBandwidthShape]") 14370 14371 def list_internet_gateways(self, compartment_id, **kwargs): 14372 """ 14373 Lists the internet gateways in the specified VCN and the specified compartment. 14374 If the VCN ID is not provided, then the list includes the internet gateways from all VCNs in the specified compartment. 14375 14376 14377 :param str compartment_id: (required) 14378 The `OCID`__ of the compartment. 14379 14380 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14381 14382 :param str vcn_id: (optional) 14383 The `OCID`__ of the VCN. 14384 14385 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14386 14387 :param int limit: (optional) 14388 For list pagination. The maximum number of results per page, or items to return in a paginated 14389 \"List\" call. For important details about how pagination works, see 14390 `List Pagination`__. 14391 14392 Example: `50` 14393 14394 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14395 14396 :param str page: (optional) 14397 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 14398 call. For important details about how pagination works, see 14399 `List Pagination`__. 14400 14401 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14402 14403 :param str display_name: (optional) 14404 A filter to return only resources that match the given display name exactly. 14405 14406 :param str sort_by: (optional) 14407 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 14408 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 14409 sort order is case sensitive. 14410 14411 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 14412 optionally filter by availability domain if the scope of the resource type is within a 14413 single availability domain. If you call one of these \"List\" operations without specifying 14414 an availability domain, the resources are grouped by availability domain, then sorted. 14415 14416 Allowed values are: "TIMECREATED", "DISPLAYNAME" 14417 14418 :param str sort_order: (optional) 14419 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 14420 is case sensitive. 14421 14422 Allowed values are: "ASC", "DESC" 14423 14424 :param str lifecycle_state: (optional) 14425 A filter to only return resources that match the given lifecycle 14426 state. The state value is case-insensitive. 14427 14428 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" 14429 14430 :param obj retry_strategy: (optional) 14431 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14432 14433 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. 14434 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14435 14436 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14437 14438 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.InternetGateway` 14439 :rtype: :class:`~oci.response.Response` 14440 14441 :example: 14442 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_internet_gateways.py.html>`__ to see an example of how to use list_internet_gateways API. 14443 """ 14444 resource_path = "/internetGateways" 14445 method = "GET" 14446 14447 # Don't accept unknown kwargs 14448 expected_kwargs = [ 14449 "retry_strategy", 14450 "vcn_id", 14451 "limit", 14452 "page", 14453 "display_name", 14454 "sort_by", 14455 "sort_order", 14456 "lifecycle_state" 14457 ] 14458 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14459 if extra_kwargs: 14460 raise ValueError( 14461 "list_internet_gateways got unknown kwargs: {!r}".format(extra_kwargs)) 14462 14463 if 'sort_by' in kwargs: 14464 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 14465 if kwargs['sort_by'] not in sort_by_allowed_values: 14466 raise ValueError( 14467 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 14468 ) 14469 14470 if 'sort_order' in kwargs: 14471 sort_order_allowed_values = ["ASC", "DESC"] 14472 if kwargs['sort_order'] not in sort_order_allowed_values: 14473 raise ValueError( 14474 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 14475 ) 14476 14477 if 'lifecycle_state' in kwargs: 14478 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"] 14479 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 14480 raise ValueError( 14481 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 14482 ) 14483 14484 query_params = { 14485 "compartmentId": compartment_id, 14486 "vcnId": kwargs.get("vcn_id", missing), 14487 "limit": kwargs.get("limit", missing), 14488 "page": kwargs.get("page", missing), 14489 "displayName": kwargs.get("display_name", missing), 14490 "sortBy": kwargs.get("sort_by", missing), 14491 "sortOrder": kwargs.get("sort_order", missing), 14492 "lifecycleState": kwargs.get("lifecycle_state", missing) 14493 } 14494 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14495 14496 header_params = { 14497 "accept": "application/json", 14498 "content-type": "application/json" 14499 } 14500 14501 retry_strategy = self.base_client.get_preferred_retry_strategy( 14502 operation_retry_strategy=kwargs.get('retry_strategy'), 14503 client_retry_strategy=self.retry_strategy 14504 ) 14505 14506 if retry_strategy: 14507 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14508 self.base_client.add_opc_client_retries_header(header_params) 14509 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14510 return retry_strategy.make_retrying_call( 14511 self.base_client.call_api, 14512 resource_path=resource_path, 14513 method=method, 14514 query_params=query_params, 14515 header_params=header_params, 14516 response_type="list[InternetGateway]") 14517 else: 14518 return self.base_client.call_api( 14519 resource_path=resource_path, 14520 method=method, 14521 query_params=query_params, 14522 header_params=header_params, 14523 response_type="list[InternetGateway]") 14524 14525 def list_ip_sec_connection_tunnel_routes(self, ipsc_id, tunnel_id, **kwargs): 14526 """ 14527 The routes advertised to the Customer and the routes received from the Customer. 14528 14529 14530 :param str ipsc_id: (required) 14531 The `OCID`__ of the IPSec connection. 14532 14533 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 14534 14535 :param str tunnel_id: (required) 14536 The `OCID`__ of the tunnel. 14537 14538 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14539 14540 :param int limit: (optional) 14541 For list pagination. The maximum number of results per page, or items to return in a paginated 14542 \"List\" call. For important details about how pagination works, see 14543 `List Pagination`__. 14544 14545 Example: `50` 14546 14547 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14548 14549 :param str page: (optional) 14550 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 14551 call. For important details about how pagination works, see 14552 `List Pagination`__. 14553 14554 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14555 14556 :param str advertiser: (optional) 14557 Specifies the advertiser of the routes. If set to ORACLE, then returns only the 14558 routes advertised by ORACLE, else if set to CUSTOMER, then returns only the 14559 routes advertised by the CUSTOMER. 14560 14561 Allowed values are: "CUSTOMER", "ORACLE" 14562 14563 :param obj retry_strategy: (optional) 14564 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14565 14566 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. 14567 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14568 14569 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14570 14571 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.TunnelRouteSummary` 14572 :rtype: :class:`~oci.response.Response` 14573 14574 :example: 14575 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_ip_sec_connection_tunnel_routes.py.html>`__ to see an example of how to use list_ip_sec_connection_tunnel_routes API. 14576 """ 14577 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/routes" 14578 method = "GET" 14579 14580 # Don't accept unknown kwargs 14581 expected_kwargs = [ 14582 "retry_strategy", 14583 "limit", 14584 "page", 14585 "advertiser" 14586 ] 14587 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14588 if extra_kwargs: 14589 raise ValueError( 14590 "list_ip_sec_connection_tunnel_routes got unknown kwargs: {!r}".format(extra_kwargs)) 14591 14592 path_params = { 14593 "ipscId": ipsc_id, 14594 "tunnelId": tunnel_id 14595 } 14596 14597 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14598 14599 for (k, v) in six.iteritems(path_params): 14600 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14601 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14602 14603 if 'advertiser' in kwargs: 14604 advertiser_allowed_values = ["CUSTOMER", "ORACLE"] 14605 if kwargs['advertiser'] not in advertiser_allowed_values: 14606 raise ValueError( 14607 "Invalid value for `advertiser`, must be one of {0}".format(advertiser_allowed_values) 14608 ) 14609 14610 query_params = { 14611 "limit": kwargs.get("limit", missing), 14612 "page": kwargs.get("page", missing), 14613 "advertiser": kwargs.get("advertiser", missing) 14614 } 14615 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14616 14617 header_params = { 14618 "accept": "application/json", 14619 "content-type": "application/json" 14620 } 14621 14622 retry_strategy = self.base_client.get_preferred_retry_strategy( 14623 operation_retry_strategy=kwargs.get('retry_strategy'), 14624 client_retry_strategy=self.retry_strategy 14625 ) 14626 14627 if retry_strategy: 14628 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14629 self.base_client.add_opc_client_retries_header(header_params) 14630 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14631 return retry_strategy.make_retrying_call( 14632 self.base_client.call_api, 14633 resource_path=resource_path, 14634 method=method, 14635 path_params=path_params, 14636 query_params=query_params, 14637 header_params=header_params, 14638 response_type="list[TunnelRouteSummary]") 14639 else: 14640 return self.base_client.call_api( 14641 resource_path=resource_path, 14642 method=method, 14643 path_params=path_params, 14644 query_params=query_params, 14645 header_params=header_params, 14646 response_type="list[TunnelRouteSummary]") 14647 14648 def list_ip_sec_connection_tunnel_security_associations(self, ipsc_id, tunnel_id, **kwargs): 14649 """ 14650 Lists the tunnel Security Associations information for the specified IPSec Tunnel ID. 14651 14652 14653 :param str ipsc_id: (required) 14654 The `OCID`__ of the IPSec connection. 14655 14656 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 14657 14658 :param str tunnel_id: (required) 14659 The `OCID`__ of the tunnel. 14660 14661 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14662 14663 :param int limit: (optional) 14664 For list pagination. The maximum number of results per page, or items to return in a paginated 14665 \"List\" call. For important details about how pagination works, see 14666 `List Pagination`__. 14667 14668 Example: `50` 14669 14670 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14671 14672 :param str page: (optional) 14673 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 14674 call. For important details about how pagination works, see 14675 `List Pagination`__. 14676 14677 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14678 14679 :param obj retry_strategy: (optional) 14680 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14681 14682 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. 14683 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14684 14685 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14686 14687 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.TunnelSecurityAssociationSummary` 14688 :rtype: :class:`~oci.response.Response` 14689 14690 :example: 14691 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_ip_sec_connection_tunnel_security_associations.py.html>`__ to see an example of how to use list_ip_sec_connection_tunnel_security_associations API. 14692 """ 14693 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/tunnelSecurityAssociations" 14694 method = "GET" 14695 14696 # Don't accept unknown kwargs 14697 expected_kwargs = [ 14698 "retry_strategy", 14699 "limit", 14700 "page" 14701 ] 14702 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14703 if extra_kwargs: 14704 raise ValueError( 14705 "list_ip_sec_connection_tunnel_security_associations got unknown kwargs: {!r}".format(extra_kwargs)) 14706 14707 path_params = { 14708 "ipscId": ipsc_id, 14709 "tunnelId": tunnel_id 14710 } 14711 14712 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14713 14714 for (k, v) in six.iteritems(path_params): 14715 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14716 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14717 14718 query_params = { 14719 "limit": kwargs.get("limit", missing), 14720 "page": kwargs.get("page", missing) 14721 } 14722 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14723 14724 header_params = { 14725 "accept": "application/json", 14726 "content-type": "application/json" 14727 } 14728 14729 retry_strategy = self.base_client.get_preferred_retry_strategy( 14730 operation_retry_strategy=kwargs.get('retry_strategy'), 14731 client_retry_strategy=self.retry_strategy 14732 ) 14733 14734 if retry_strategy: 14735 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14736 self.base_client.add_opc_client_retries_header(header_params) 14737 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14738 return retry_strategy.make_retrying_call( 14739 self.base_client.call_api, 14740 resource_path=resource_path, 14741 method=method, 14742 path_params=path_params, 14743 query_params=query_params, 14744 header_params=header_params, 14745 response_type="list[TunnelSecurityAssociationSummary]") 14746 else: 14747 return self.base_client.call_api( 14748 resource_path=resource_path, 14749 method=method, 14750 path_params=path_params, 14751 query_params=query_params, 14752 header_params=header_params, 14753 response_type="list[TunnelSecurityAssociationSummary]") 14754 14755 def list_ip_sec_connection_tunnels(self, ipsc_id, **kwargs): 14756 """ 14757 Lists the tunnel information for the specified IPSec connection. 14758 14759 14760 :param str ipsc_id: (required) 14761 The `OCID`__ of the IPSec connection. 14762 14763 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 14764 14765 :param int limit: (optional) 14766 For list pagination. The maximum number of results per page, or items to return in a paginated 14767 \"List\" call. For important details about how pagination works, see 14768 `List Pagination`__. 14769 14770 Example: `50` 14771 14772 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14773 14774 :param str page: (optional) 14775 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 14776 call. For important details about how pagination works, see 14777 `List Pagination`__. 14778 14779 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14780 14781 :param obj retry_strategy: (optional) 14782 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14783 14784 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. 14785 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14786 14787 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14788 14789 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.IPSecConnectionTunnel` 14790 :rtype: :class:`~oci.response.Response` 14791 14792 :example: 14793 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_ip_sec_connection_tunnels.py.html>`__ to see an example of how to use list_ip_sec_connection_tunnels API. 14794 """ 14795 resource_path = "/ipsecConnections/{ipscId}/tunnels" 14796 method = "GET" 14797 14798 # Don't accept unknown kwargs 14799 expected_kwargs = [ 14800 "retry_strategy", 14801 "limit", 14802 "page" 14803 ] 14804 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14805 if extra_kwargs: 14806 raise ValueError( 14807 "list_ip_sec_connection_tunnels got unknown kwargs: {!r}".format(extra_kwargs)) 14808 14809 path_params = { 14810 "ipscId": ipsc_id 14811 } 14812 14813 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14814 14815 for (k, v) in six.iteritems(path_params): 14816 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14817 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14818 14819 query_params = { 14820 "limit": kwargs.get("limit", missing), 14821 "page": kwargs.get("page", missing) 14822 } 14823 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14824 14825 header_params = { 14826 "accept": "application/json", 14827 "content-type": "application/json" 14828 } 14829 14830 retry_strategy = self.base_client.get_preferred_retry_strategy( 14831 operation_retry_strategy=kwargs.get('retry_strategy'), 14832 client_retry_strategy=self.retry_strategy 14833 ) 14834 14835 if retry_strategy: 14836 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14837 self.base_client.add_opc_client_retries_header(header_params) 14838 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14839 return retry_strategy.make_retrying_call( 14840 self.base_client.call_api, 14841 resource_path=resource_path, 14842 method=method, 14843 path_params=path_params, 14844 query_params=query_params, 14845 header_params=header_params, 14846 response_type="list[IPSecConnectionTunnel]") 14847 else: 14848 return self.base_client.call_api( 14849 resource_path=resource_path, 14850 method=method, 14851 path_params=path_params, 14852 query_params=query_params, 14853 header_params=header_params, 14854 response_type="list[IPSecConnectionTunnel]") 14855 14856 def list_ip_sec_connections(self, compartment_id, **kwargs): 14857 """ 14858 Lists the IPSec connections for the specified compartment. You can filter the 14859 results by DRG or CPE. 14860 14861 14862 :param str compartment_id: (required) 14863 The `OCID`__ of the compartment. 14864 14865 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14866 14867 :param str drg_id: (optional) 14868 The `OCID`__ of the DRG. 14869 14870 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14871 14872 :param str cpe_id: (optional) 14873 The `OCID`__ of the CPE. 14874 14875 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 14876 14877 :param int limit: (optional) 14878 For list pagination. The maximum number of results per page, or items to return in a paginated 14879 \"List\" call. For important details about how pagination works, see 14880 `List Pagination`__. 14881 14882 Example: `50` 14883 14884 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14885 14886 :param str page: (optional) 14887 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 14888 call. For important details about how pagination works, see 14889 `List Pagination`__. 14890 14891 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14892 14893 :param obj retry_strategy: (optional) 14894 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14895 14896 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. 14897 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14898 14899 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14900 14901 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.IPSecConnection` 14902 :rtype: :class:`~oci.response.Response` 14903 14904 :example: 14905 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_ip_sec_connections.py.html>`__ to see an example of how to use list_ip_sec_connections API. 14906 """ 14907 resource_path = "/ipsecConnections" 14908 method = "GET" 14909 14910 # Don't accept unknown kwargs 14911 expected_kwargs = [ 14912 "retry_strategy", 14913 "drg_id", 14914 "cpe_id", 14915 "limit", 14916 "page" 14917 ] 14918 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14919 if extra_kwargs: 14920 raise ValueError( 14921 "list_ip_sec_connections got unknown kwargs: {!r}".format(extra_kwargs)) 14922 14923 query_params = { 14924 "compartmentId": compartment_id, 14925 "drgId": kwargs.get("drg_id", missing), 14926 "cpeId": kwargs.get("cpe_id", missing), 14927 "limit": kwargs.get("limit", missing), 14928 "page": kwargs.get("page", missing) 14929 } 14930 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14931 14932 header_params = { 14933 "accept": "application/json", 14934 "content-type": "application/json" 14935 } 14936 14937 retry_strategy = self.base_client.get_preferred_retry_strategy( 14938 operation_retry_strategy=kwargs.get('retry_strategy'), 14939 client_retry_strategy=self.retry_strategy 14940 ) 14941 14942 if retry_strategy: 14943 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14944 self.base_client.add_opc_client_retries_header(header_params) 14945 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14946 return retry_strategy.make_retrying_call( 14947 self.base_client.call_api, 14948 resource_path=resource_path, 14949 method=method, 14950 query_params=query_params, 14951 header_params=header_params, 14952 response_type="list[IPSecConnection]") 14953 else: 14954 return self.base_client.call_api( 14955 resource_path=resource_path, 14956 method=method, 14957 query_params=query_params, 14958 header_params=header_params, 14959 response_type="list[IPSecConnection]") 14960 14961 def list_ipv6s(self, **kwargs): 14962 """ 14963 Lists the :class:`Ipv6` objects based 14964 on one of these filters: 14965 14966 * Subnet `OCID`__. 14967 * VNIC `OCID`__. 14968 * Both IPv6 address and subnet OCID: This lets you get an `Ipv6` object based on its private 14969 IPv6 address (for example, 2001:0db8:0123:1111:abcd:ef01:2345:6789) and not its `OCID`__. For comparison, 14970 :func:`get_ipv6` requires the `OCID`__. 14971 14972 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14973 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14974 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14975 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 14976 14977 14978 :param int limit: (optional) 14979 For list pagination. The maximum number of results per page, or items to return in a paginated 14980 \"List\" call. For important details about how pagination works, see 14981 `List Pagination`__. 14982 14983 Example: `50` 14984 14985 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14986 14987 :param str page: (optional) 14988 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 14989 call. For important details about how pagination works, see 14990 `List Pagination`__. 14991 14992 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 14993 14994 :param str ip_address: (optional) 14995 An IP address. This could be either IPv4 or IPv6, depending on the resource. 14996 Example: `10.0.3.3` 14997 14998 :param str subnet_id: (optional) 14999 The `OCID`__ of the subnet. 15000 15001 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 15002 15003 :param str vnic_id: (optional) 15004 The OCID of the VNIC. 15005 15006 :param str opc_request_id: (optional) 15007 Unique identifier for the request. 15008 If you need to contact Oracle about a particular request, please provide the request ID. 15009 15010 :param obj retry_strategy: (optional) 15011 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15012 15013 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. 15014 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15015 15016 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15017 15018 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Ipv6` 15019 :rtype: :class:`~oci.response.Response` 15020 15021 :example: 15022 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_ipv6s.py.html>`__ to see an example of how to use list_ipv6s API. 15023 """ 15024 resource_path = "/ipv6" 15025 method = "GET" 15026 15027 # Don't accept unknown kwargs 15028 expected_kwargs = [ 15029 "retry_strategy", 15030 "limit", 15031 "page", 15032 "ip_address", 15033 "subnet_id", 15034 "vnic_id", 15035 "opc_request_id" 15036 ] 15037 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15038 if extra_kwargs: 15039 raise ValueError( 15040 "list_ipv6s got unknown kwargs: {!r}".format(extra_kwargs)) 15041 15042 query_params = { 15043 "limit": kwargs.get("limit", missing), 15044 "page": kwargs.get("page", missing), 15045 "ipAddress": kwargs.get("ip_address", missing), 15046 "subnetId": kwargs.get("subnet_id", missing), 15047 "vnicId": kwargs.get("vnic_id", missing) 15048 } 15049 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 15050 15051 header_params = { 15052 "accept": "application/json", 15053 "content-type": "application/json", 15054 "opc-request-id": kwargs.get("opc_request_id", missing) 15055 } 15056 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15057 15058 retry_strategy = self.base_client.get_preferred_retry_strategy( 15059 operation_retry_strategy=kwargs.get('retry_strategy'), 15060 client_retry_strategy=self.retry_strategy 15061 ) 15062 15063 if retry_strategy: 15064 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15065 self.base_client.add_opc_client_retries_header(header_params) 15066 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15067 return retry_strategy.make_retrying_call( 15068 self.base_client.call_api, 15069 resource_path=resource_path, 15070 method=method, 15071 query_params=query_params, 15072 header_params=header_params, 15073 response_type="list[Ipv6]") 15074 else: 15075 return self.base_client.call_api( 15076 resource_path=resource_path, 15077 method=method, 15078 query_params=query_params, 15079 header_params=header_params, 15080 response_type="list[Ipv6]") 15081 15082 def list_local_peering_gateways(self, compartment_id, **kwargs): 15083 """ 15084 Lists the local peering gateways (LPGs) for the specified VCN and specified compartment. 15085 If the VCN ID is not provided, then the list includes the LPGs from all VCNs in the specified compartment. 15086 15087 15088 :param str compartment_id: (required) 15089 The `OCID`__ of the compartment. 15090 15091 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15092 15093 :param int limit: (optional) 15094 For list pagination. The maximum number of results per page, or items to return in a paginated 15095 \"List\" call. For important details about how pagination works, see 15096 `List Pagination`__. 15097 15098 Example: `50` 15099 15100 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15101 15102 :param str page: (optional) 15103 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 15104 call. For important details about how pagination works, see 15105 `List Pagination`__. 15106 15107 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15108 15109 :param str vcn_id: (optional) 15110 The `OCID`__ of the VCN. 15111 15112 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15113 15114 :param obj retry_strategy: (optional) 15115 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15116 15117 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. 15118 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15119 15120 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15121 15122 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.LocalPeeringGateway` 15123 :rtype: :class:`~oci.response.Response` 15124 15125 :example: 15126 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_local_peering_gateways.py.html>`__ to see an example of how to use list_local_peering_gateways API. 15127 """ 15128 resource_path = "/localPeeringGateways" 15129 method = "GET" 15130 15131 # Don't accept unknown kwargs 15132 expected_kwargs = [ 15133 "retry_strategy", 15134 "limit", 15135 "page", 15136 "vcn_id" 15137 ] 15138 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15139 if extra_kwargs: 15140 raise ValueError( 15141 "list_local_peering_gateways got unknown kwargs: {!r}".format(extra_kwargs)) 15142 15143 query_params = { 15144 "compartmentId": compartment_id, 15145 "limit": kwargs.get("limit", missing), 15146 "page": kwargs.get("page", missing), 15147 "vcnId": kwargs.get("vcn_id", missing) 15148 } 15149 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 15150 15151 header_params = { 15152 "accept": "application/json", 15153 "content-type": "application/json" 15154 } 15155 15156 retry_strategy = self.base_client.get_preferred_retry_strategy( 15157 operation_retry_strategy=kwargs.get('retry_strategy'), 15158 client_retry_strategy=self.retry_strategy 15159 ) 15160 15161 if retry_strategy: 15162 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15163 self.base_client.add_opc_client_retries_header(header_params) 15164 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15165 return retry_strategy.make_retrying_call( 15166 self.base_client.call_api, 15167 resource_path=resource_path, 15168 method=method, 15169 query_params=query_params, 15170 header_params=header_params, 15171 response_type="list[LocalPeeringGateway]") 15172 else: 15173 return self.base_client.call_api( 15174 resource_path=resource_path, 15175 method=method, 15176 query_params=query_params, 15177 header_params=header_params, 15178 response_type="list[LocalPeeringGateway]") 15179 15180 def list_nat_gateways(self, compartment_id, **kwargs): 15181 """ 15182 Lists the NAT gateways in the specified compartment. You may optionally specify a VCN OCID 15183 to filter the results by VCN. 15184 15185 15186 :param str compartment_id: (required) 15187 The `OCID`__ of the compartment. 15188 15189 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15190 15191 :param str vcn_id: (optional) 15192 The `OCID`__ of the VCN. 15193 15194 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15195 15196 :param int limit: (optional) 15197 For list pagination. The maximum number of results per page, or items to return in a paginated 15198 \"List\" call. For important details about how pagination works, see 15199 `List Pagination`__. 15200 15201 Example: `50` 15202 15203 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15204 15205 :param str page: (optional) 15206 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 15207 call. For important details about how pagination works, see 15208 `List Pagination`__. 15209 15210 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15211 15212 :param str display_name: (optional) 15213 A filter to return only resources that match the given display name exactly. 15214 15215 :param str sort_by: (optional) 15216 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 15217 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 15218 sort order is case sensitive. 15219 15220 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 15221 optionally filter by availability domain if the scope of the resource type is within a 15222 single availability domain. If you call one of these \"List\" operations without specifying 15223 an availability domain, the resources are grouped by availability domain, then sorted. 15224 15225 Allowed values are: "TIMECREATED", "DISPLAYNAME" 15226 15227 :param str sort_order: (optional) 15228 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 15229 is case sensitive. 15230 15231 Allowed values are: "ASC", "DESC" 15232 15233 :param str lifecycle_state: (optional) 15234 A filter to return only resources that match the specified lifecycle 15235 state. The value is case insensitive. 15236 15237 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" 15238 15239 :param obj retry_strategy: (optional) 15240 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15241 15242 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. 15243 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15244 15245 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15246 15247 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.NatGateway` 15248 :rtype: :class:`~oci.response.Response` 15249 15250 :example: 15251 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_nat_gateways.py.html>`__ to see an example of how to use list_nat_gateways API. 15252 """ 15253 resource_path = "/natGateways" 15254 method = "GET" 15255 15256 # Don't accept unknown kwargs 15257 expected_kwargs = [ 15258 "retry_strategy", 15259 "vcn_id", 15260 "limit", 15261 "page", 15262 "display_name", 15263 "sort_by", 15264 "sort_order", 15265 "lifecycle_state" 15266 ] 15267 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15268 if extra_kwargs: 15269 raise ValueError( 15270 "list_nat_gateways got unknown kwargs: {!r}".format(extra_kwargs)) 15271 15272 if 'sort_by' in kwargs: 15273 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 15274 if kwargs['sort_by'] not in sort_by_allowed_values: 15275 raise ValueError( 15276 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 15277 ) 15278 15279 if 'sort_order' in kwargs: 15280 sort_order_allowed_values = ["ASC", "DESC"] 15281 if kwargs['sort_order'] not in sort_order_allowed_values: 15282 raise ValueError( 15283 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 15284 ) 15285 15286 if 'lifecycle_state' in kwargs: 15287 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"] 15288 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 15289 raise ValueError( 15290 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 15291 ) 15292 15293 query_params = { 15294 "compartmentId": compartment_id, 15295 "vcnId": kwargs.get("vcn_id", missing), 15296 "limit": kwargs.get("limit", missing), 15297 "page": kwargs.get("page", missing), 15298 "displayName": kwargs.get("display_name", missing), 15299 "sortBy": kwargs.get("sort_by", missing), 15300 "sortOrder": kwargs.get("sort_order", missing), 15301 "lifecycleState": kwargs.get("lifecycle_state", missing) 15302 } 15303 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 15304 15305 header_params = { 15306 "accept": "application/json", 15307 "content-type": "application/json" 15308 } 15309 15310 retry_strategy = self.base_client.get_preferred_retry_strategy( 15311 operation_retry_strategy=kwargs.get('retry_strategy'), 15312 client_retry_strategy=self.retry_strategy 15313 ) 15314 15315 if retry_strategy: 15316 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15317 self.base_client.add_opc_client_retries_header(header_params) 15318 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15319 return retry_strategy.make_retrying_call( 15320 self.base_client.call_api, 15321 resource_path=resource_path, 15322 method=method, 15323 query_params=query_params, 15324 header_params=header_params, 15325 response_type="list[NatGateway]") 15326 else: 15327 return self.base_client.call_api( 15328 resource_path=resource_path, 15329 method=method, 15330 query_params=query_params, 15331 header_params=header_params, 15332 response_type="list[NatGateway]") 15333 15334 def list_network_security_group_security_rules(self, network_security_group_id, **kwargs): 15335 """ 15336 Lists the security rules in the specified network security group. 15337 15338 15339 :param str network_security_group_id: (required) 15340 The `OCID`__ of the network security group. 15341 15342 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15343 15344 :param str direction: (optional) 15345 Direction of the security rule. Set to `EGRESS` for rules that allow outbound IP packets, 15346 or `INGRESS` for rules that allow inbound IP packets. 15347 15348 Allowed values are: "EGRESS", "INGRESS" 15349 15350 :param int limit: (optional) 15351 For list pagination. The maximum number of results per page, or items to return in a paginated 15352 \"List\" call. For important details about how pagination works, see 15353 `List Pagination`__. 15354 15355 Example: `50` 15356 15357 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15358 15359 :param str page: (optional) 15360 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 15361 call. For important details about how pagination works, see 15362 `List Pagination`__. 15363 15364 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15365 15366 :param str sort_by: (optional) 15367 The field to sort by. 15368 15369 Allowed values are: "TIMECREATED" 15370 15371 :param str sort_order: (optional) 15372 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 15373 is case sensitive. 15374 15375 Allowed values are: "ASC", "DESC" 15376 15377 :param obj retry_strategy: (optional) 15378 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15379 15380 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. 15381 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15382 15383 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15384 15385 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.SecurityRule` 15386 :rtype: :class:`~oci.response.Response` 15387 15388 :example: 15389 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_network_security_group_security_rules.py.html>`__ to see an example of how to use list_network_security_group_security_rules API. 15390 """ 15391 resource_path = "/networkSecurityGroups/{networkSecurityGroupId}/securityRules" 15392 method = "GET" 15393 15394 # Don't accept unknown kwargs 15395 expected_kwargs = [ 15396 "retry_strategy", 15397 "direction", 15398 "limit", 15399 "page", 15400 "sort_by", 15401 "sort_order" 15402 ] 15403 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15404 if extra_kwargs: 15405 raise ValueError( 15406 "list_network_security_group_security_rules got unknown kwargs: {!r}".format(extra_kwargs)) 15407 15408 path_params = { 15409 "networkSecurityGroupId": network_security_group_id 15410 } 15411 15412 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15413 15414 for (k, v) in six.iteritems(path_params): 15415 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15416 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15417 15418 if 'direction' in kwargs: 15419 direction_allowed_values = ["EGRESS", "INGRESS"] 15420 if kwargs['direction'] not in direction_allowed_values: 15421 raise ValueError( 15422 "Invalid value for `direction`, must be one of {0}".format(direction_allowed_values) 15423 ) 15424 15425 if 'sort_by' in kwargs: 15426 sort_by_allowed_values = ["TIMECREATED"] 15427 if kwargs['sort_by'] not in sort_by_allowed_values: 15428 raise ValueError( 15429 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 15430 ) 15431 15432 if 'sort_order' in kwargs: 15433 sort_order_allowed_values = ["ASC", "DESC"] 15434 if kwargs['sort_order'] not in sort_order_allowed_values: 15435 raise ValueError( 15436 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 15437 ) 15438 15439 query_params = { 15440 "direction": kwargs.get("direction", missing), 15441 "limit": kwargs.get("limit", missing), 15442 "page": kwargs.get("page", missing), 15443 "sortBy": kwargs.get("sort_by", missing), 15444 "sortOrder": kwargs.get("sort_order", missing) 15445 } 15446 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 15447 15448 header_params = { 15449 "accept": "application/json", 15450 "content-type": "application/json" 15451 } 15452 15453 retry_strategy = self.base_client.get_preferred_retry_strategy( 15454 operation_retry_strategy=kwargs.get('retry_strategy'), 15455 client_retry_strategy=self.retry_strategy 15456 ) 15457 15458 if retry_strategy: 15459 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15460 self.base_client.add_opc_client_retries_header(header_params) 15461 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15462 return retry_strategy.make_retrying_call( 15463 self.base_client.call_api, 15464 resource_path=resource_path, 15465 method=method, 15466 path_params=path_params, 15467 query_params=query_params, 15468 header_params=header_params, 15469 response_type="list[SecurityRule]") 15470 else: 15471 return self.base_client.call_api( 15472 resource_path=resource_path, 15473 method=method, 15474 path_params=path_params, 15475 query_params=query_params, 15476 header_params=header_params, 15477 response_type="list[SecurityRule]") 15478 15479 def list_network_security_group_vnics(self, network_security_group_id, **kwargs): 15480 """ 15481 Lists the VNICs in the specified network security group. 15482 15483 15484 :param str network_security_group_id: (required) 15485 The `OCID`__ of the network security group. 15486 15487 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15488 15489 :param int limit: (optional) 15490 For list pagination. The maximum number of results per page, or items to return in a paginated 15491 \"List\" call. For important details about how pagination works, see 15492 `List Pagination`__. 15493 15494 Example: `50` 15495 15496 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15497 15498 :param str page: (optional) 15499 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 15500 call. For important details about how pagination works, see 15501 `List Pagination`__. 15502 15503 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15504 15505 :param str sort_by: (optional) 15506 The field to sort by. 15507 15508 Allowed values are: "TIMEASSOCIATED" 15509 15510 :param str sort_order: (optional) 15511 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 15512 is case sensitive. 15513 15514 Allowed values are: "ASC", "DESC" 15515 15516 :param obj retry_strategy: (optional) 15517 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15518 15519 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. 15520 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15521 15522 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15523 15524 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.NetworkSecurityGroupVnic` 15525 :rtype: :class:`~oci.response.Response` 15526 15527 :example: 15528 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_network_security_group_vnics.py.html>`__ to see an example of how to use list_network_security_group_vnics API. 15529 """ 15530 resource_path = "/networkSecurityGroups/{networkSecurityGroupId}/vnics" 15531 method = "GET" 15532 15533 # Don't accept unknown kwargs 15534 expected_kwargs = [ 15535 "retry_strategy", 15536 "limit", 15537 "page", 15538 "sort_by", 15539 "sort_order" 15540 ] 15541 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15542 if extra_kwargs: 15543 raise ValueError( 15544 "list_network_security_group_vnics got unknown kwargs: {!r}".format(extra_kwargs)) 15545 15546 path_params = { 15547 "networkSecurityGroupId": network_security_group_id 15548 } 15549 15550 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15551 15552 for (k, v) in six.iteritems(path_params): 15553 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15554 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15555 15556 if 'sort_by' in kwargs: 15557 sort_by_allowed_values = ["TIMEASSOCIATED"] 15558 if kwargs['sort_by'] not in sort_by_allowed_values: 15559 raise ValueError( 15560 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 15561 ) 15562 15563 if 'sort_order' in kwargs: 15564 sort_order_allowed_values = ["ASC", "DESC"] 15565 if kwargs['sort_order'] not in sort_order_allowed_values: 15566 raise ValueError( 15567 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 15568 ) 15569 15570 query_params = { 15571 "limit": kwargs.get("limit", missing), 15572 "page": kwargs.get("page", missing), 15573 "sortBy": kwargs.get("sort_by", missing), 15574 "sortOrder": kwargs.get("sort_order", missing) 15575 } 15576 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 15577 15578 header_params = { 15579 "accept": "application/json", 15580 "content-type": "application/json" 15581 } 15582 15583 retry_strategy = self.base_client.get_preferred_retry_strategy( 15584 operation_retry_strategy=kwargs.get('retry_strategy'), 15585 client_retry_strategy=self.retry_strategy 15586 ) 15587 15588 if retry_strategy: 15589 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15590 self.base_client.add_opc_client_retries_header(header_params) 15591 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15592 return retry_strategy.make_retrying_call( 15593 self.base_client.call_api, 15594 resource_path=resource_path, 15595 method=method, 15596 path_params=path_params, 15597 query_params=query_params, 15598 header_params=header_params, 15599 response_type="list[NetworkSecurityGroupVnic]") 15600 else: 15601 return self.base_client.call_api( 15602 resource_path=resource_path, 15603 method=method, 15604 path_params=path_params, 15605 query_params=query_params, 15606 header_params=header_params, 15607 response_type="list[NetworkSecurityGroupVnic]") 15608 15609 def list_network_security_groups(self, **kwargs): 15610 """ 15611 Lists either the network security groups in the specified compartment, or those associated with the specified VLAN. 15612 You must specify either a `vlanId` or a `compartmentId`, but not both. If you specify a `vlanId`, all other parameters are ignored. 15613 15614 15615 :param str compartment_id: (optional) 15616 The `OCID`__ of the compartment. 15617 15618 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15619 15620 :param str vlan_id: (optional) 15621 The `OCID`__ of the VLAN. 15622 15623 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15624 15625 :param str vcn_id: (optional) 15626 The `OCID`__ of the VCN. 15627 15628 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15629 15630 :param int limit: (optional) 15631 For list pagination. The maximum number of results per page, or items to return in a paginated 15632 \"List\" call. For important details about how pagination works, see 15633 `List Pagination`__. 15634 15635 Example: `50` 15636 15637 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15638 15639 :param str page: (optional) 15640 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 15641 call. For important details about how pagination works, see 15642 `List Pagination`__. 15643 15644 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15645 15646 :param str display_name: (optional) 15647 A filter to return only resources that match the given display name exactly. 15648 15649 :param str sort_by: (optional) 15650 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 15651 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 15652 sort order is case sensitive. 15653 15654 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 15655 optionally filter by availability domain if the scope of the resource type is within a 15656 single availability domain. If you call one of these \"List\" operations without specifying 15657 an availability domain, the resources are grouped by availability domain, then sorted. 15658 15659 Allowed values are: "TIMECREATED", "DISPLAYNAME" 15660 15661 :param str sort_order: (optional) 15662 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 15663 is case sensitive. 15664 15665 Allowed values are: "ASC", "DESC" 15666 15667 :param str lifecycle_state: (optional) 15668 A filter to return only resources that match the specified lifecycle 15669 state. The value is case insensitive. 15670 15671 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" 15672 15673 :param obj retry_strategy: (optional) 15674 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15675 15676 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. 15677 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15678 15679 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15680 15681 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.NetworkSecurityGroup` 15682 :rtype: :class:`~oci.response.Response` 15683 15684 :example: 15685 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_network_security_groups.py.html>`__ to see an example of how to use list_network_security_groups API. 15686 """ 15687 resource_path = "/networkSecurityGroups" 15688 method = "GET" 15689 15690 # Don't accept unknown kwargs 15691 expected_kwargs = [ 15692 "retry_strategy", 15693 "compartment_id", 15694 "vlan_id", 15695 "vcn_id", 15696 "limit", 15697 "page", 15698 "display_name", 15699 "sort_by", 15700 "sort_order", 15701 "lifecycle_state" 15702 ] 15703 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15704 if extra_kwargs: 15705 raise ValueError( 15706 "list_network_security_groups got unknown kwargs: {!r}".format(extra_kwargs)) 15707 15708 if 'sort_by' in kwargs: 15709 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 15710 if kwargs['sort_by'] not in sort_by_allowed_values: 15711 raise ValueError( 15712 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 15713 ) 15714 15715 if 'sort_order' in kwargs: 15716 sort_order_allowed_values = ["ASC", "DESC"] 15717 if kwargs['sort_order'] not in sort_order_allowed_values: 15718 raise ValueError( 15719 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 15720 ) 15721 15722 if 'lifecycle_state' in kwargs: 15723 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"] 15724 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 15725 raise ValueError( 15726 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 15727 ) 15728 15729 query_params = { 15730 "compartmentId": kwargs.get("compartment_id", missing), 15731 "vlanId": kwargs.get("vlan_id", missing), 15732 "vcnId": kwargs.get("vcn_id", missing), 15733 "limit": kwargs.get("limit", missing), 15734 "page": kwargs.get("page", missing), 15735 "displayName": kwargs.get("display_name", missing), 15736 "sortBy": kwargs.get("sort_by", missing), 15737 "sortOrder": kwargs.get("sort_order", missing), 15738 "lifecycleState": kwargs.get("lifecycle_state", missing) 15739 } 15740 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 15741 15742 header_params = { 15743 "accept": "application/json", 15744 "content-type": "application/json" 15745 } 15746 15747 retry_strategy = self.base_client.get_preferred_retry_strategy( 15748 operation_retry_strategy=kwargs.get('retry_strategy'), 15749 client_retry_strategy=self.retry_strategy 15750 ) 15751 15752 if retry_strategy: 15753 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15754 self.base_client.add_opc_client_retries_header(header_params) 15755 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15756 return retry_strategy.make_retrying_call( 15757 self.base_client.call_api, 15758 resource_path=resource_path, 15759 method=method, 15760 query_params=query_params, 15761 header_params=header_params, 15762 response_type="list[NetworkSecurityGroup]") 15763 else: 15764 return self.base_client.call_api( 15765 resource_path=resource_path, 15766 method=method, 15767 query_params=query_params, 15768 header_params=header_params, 15769 response_type="list[NetworkSecurityGroup]") 15770 15771 def list_private_ips(self, **kwargs): 15772 """ 15773 Lists the :class:`PrivateIp` objects based 15774 on one of these filters: 15775 15776 - Subnet `OCID`__. 15777 - VNIC `OCID`__. 15778 - Both private IP address and subnet OCID: This lets 15779 you get a `privateIP` object based on its private IP 15780 address (for example, 10.0.3.3) and not its `OCID`__. For comparison, 15781 :func:`get_private_ip` 15782 requires the `OCID`__. 15783 15784 If you're listing all the private IPs associated with a given subnet 15785 or VNIC, the response includes both primary and secondary private IPs. 15786 15787 If you are an Oracle Cloud VMware Solution customer and have VLANs 15788 in your VCN, you can filter the list by VLAN `OCID`__. See :class:`Vlan`. 15789 15790 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15791 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15792 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15793 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15794 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15795 15796 15797 :param int limit: (optional) 15798 For list pagination. The maximum number of results per page, or items to return in a paginated 15799 \"List\" call. For important details about how pagination works, see 15800 `List Pagination`__. 15801 15802 Example: `50` 15803 15804 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15805 15806 :param str page: (optional) 15807 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 15808 call. For important details about how pagination works, see 15809 `List Pagination`__. 15810 15811 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15812 15813 :param str ip_address: (optional) 15814 An IP address. This could be either IPv4 or IPv6, depending on the resource. 15815 Example: `10.0.3.3` 15816 15817 :param str subnet_id: (optional) 15818 The `OCID`__ of the subnet. 15819 15820 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 15821 15822 :param str vnic_id: (optional) 15823 The OCID of the VNIC. 15824 15825 :param str vlan_id: (optional) 15826 The `OCID`__ of the VLAN. 15827 15828 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15829 15830 :param obj retry_strategy: (optional) 15831 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15832 15833 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. 15834 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15835 15836 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15837 15838 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.PrivateIp` 15839 :rtype: :class:`~oci.response.Response` 15840 15841 :example: 15842 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_private_ips.py.html>`__ to see an example of how to use list_private_ips API. 15843 """ 15844 resource_path = "/privateIps" 15845 method = "GET" 15846 15847 # Don't accept unknown kwargs 15848 expected_kwargs = [ 15849 "retry_strategy", 15850 "limit", 15851 "page", 15852 "ip_address", 15853 "subnet_id", 15854 "vnic_id", 15855 "vlan_id" 15856 ] 15857 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15858 if extra_kwargs: 15859 raise ValueError( 15860 "list_private_ips got unknown kwargs: {!r}".format(extra_kwargs)) 15861 15862 query_params = { 15863 "limit": kwargs.get("limit", missing), 15864 "page": kwargs.get("page", missing), 15865 "ipAddress": kwargs.get("ip_address", missing), 15866 "subnetId": kwargs.get("subnet_id", missing), 15867 "vnicId": kwargs.get("vnic_id", missing), 15868 "vlanId": kwargs.get("vlan_id", missing) 15869 } 15870 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 15871 15872 header_params = { 15873 "accept": "application/json", 15874 "content-type": "application/json" 15875 } 15876 15877 retry_strategy = self.base_client.get_preferred_retry_strategy( 15878 operation_retry_strategy=kwargs.get('retry_strategy'), 15879 client_retry_strategy=self.retry_strategy 15880 ) 15881 15882 if retry_strategy: 15883 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15884 self.base_client.add_opc_client_retries_header(header_params) 15885 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15886 return retry_strategy.make_retrying_call( 15887 self.base_client.call_api, 15888 resource_path=resource_path, 15889 method=method, 15890 query_params=query_params, 15891 header_params=header_params, 15892 response_type="list[PrivateIp]") 15893 else: 15894 return self.base_client.call_api( 15895 resource_path=resource_path, 15896 method=method, 15897 query_params=query_params, 15898 header_params=header_params, 15899 response_type="list[PrivateIp]") 15900 15901 def list_public_ip_pools(self, compartment_id, **kwargs): 15902 """ 15903 Lists the public IP pools in the specified compartment. 15904 You can filter the list using query parameters. 15905 15906 15907 :param str compartment_id: (required) 15908 The `OCID`__ of the compartment. 15909 15910 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 15911 15912 :param str opc_request_id: (optional) 15913 Unique identifier for the request. 15914 If you need to contact Oracle about a particular request, please provide the request ID. 15915 15916 :param int limit: (optional) 15917 For list pagination. The maximum number of results per page, or items to return in a paginated 15918 \"List\" call. For important details about how pagination works, see 15919 `List Pagination`__. 15920 15921 Example: `50` 15922 15923 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15924 15925 :param str page: (optional) 15926 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 15927 call. For important details about how pagination works, see 15928 `List Pagination`__. 15929 15930 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 15931 15932 :param str display_name: (optional) 15933 A filter to return only resources that match the given display name exactly. 15934 15935 :param str byoip_range_id: (optional) 15936 A filter to return only resources that match the given BYOIP CIDR block. 15937 15938 :param str sort_by: (optional) 15939 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 15940 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 15941 sort order is case sensitive. 15942 15943 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 15944 optionally filter by availability domain if the scope of the resource type is within a 15945 single availability domain. If you call one of these \"List\" operations without specifying 15946 an availability domain, the resources are grouped by availability domain, then sorted. 15947 15948 Allowed values are: "TIMECREATED", "DISPLAYNAME" 15949 15950 :param str sort_order: (optional) 15951 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 15952 is case sensitive. 15953 15954 Allowed values are: "ASC", "DESC" 15955 15956 :param obj retry_strategy: (optional) 15957 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15958 15959 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. 15960 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15961 15962 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15963 15964 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPoolCollection` 15965 :rtype: :class:`~oci.response.Response` 15966 15967 :example: 15968 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_public_ip_pools.py.html>`__ to see an example of how to use list_public_ip_pools API. 15969 """ 15970 resource_path = "/publicIpPools" 15971 method = "GET" 15972 15973 # Don't accept unknown kwargs 15974 expected_kwargs = [ 15975 "retry_strategy", 15976 "opc_request_id", 15977 "limit", 15978 "page", 15979 "display_name", 15980 "byoip_range_id", 15981 "sort_by", 15982 "sort_order" 15983 ] 15984 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15985 if extra_kwargs: 15986 raise ValueError( 15987 "list_public_ip_pools got unknown kwargs: {!r}".format(extra_kwargs)) 15988 15989 if 'sort_by' in kwargs: 15990 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 15991 if kwargs['sort_by'] not in sort_by_allowed_values: 15992 raise ValueError( 15993 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 15994 ) 15995 15996 if 'sort_order' in kwargs: 15997 sort_order_allowed_values = ["ASC", "DESC"] 15998 if kwargs['sort_order'] not in sort_order_allowed_values: 15999 raise ValueError( 16000 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 16001 ) 16002 16003 query_params = { 16004 "limit": kwargs.get("limit", missing), 16005 "page": kwargs.get("page", missing), 16006 "displayName": kwargs.get("display_name", missing), 16007 "byoipRangeId": kwargs.get("byoip_range_id", missing), 16008 "sortBy": kwargs.get("sort_by", missing), 16009 "sortOrder": kwargs.get("sort_order", missing), 16010 "compartmentId": compartment_id 16011 } 16012 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 16013 16014 header_params = { 16015 "accept": "application/json", 16016 "content-type": "application/json", 16017 "opc-request-id": kwargs.get("opc_request_id", missing) 16018 } 16019 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16020 16021 retry_strategy = self.base_client.get_preferred_retry_strategy( 16022 operation_retry_strategy=kwargs.get('retry_strategy'), 16023 client_retry_strategy=self.retry_strategy 16024 ) 16025 16026 if retry_strategy: 16027 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16028 self.base_client.add_opc_client_retries_header(header_params) 16029 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16030 return retry_strategy.make_retrying_call( 16031 self.base_client.call_api, 16032 resource_path=resource_path, 16033 method=method, 16034 query_params=query_params, 16035 header_params=header_params, 16036 response_type="PublicIpPoolCollection") 16037 else: 16038 return self.base_client.call_api( 16039 resource_path=resource_path, 16040 method=method, 16041 query_params=query_params, 16042 header_params=header_params, 16043 response_type="PublicIpPoolCollection") 16044 16045 def list_public_ips(self, scope, compartment_id, **kwargs): 16046 """ 16047 Lists the :class:`PublicIp` objects 16048 in the specified compartment. You can filter the list by using query parameters. 16049 16050 To list your reserved public IPs: 16051 * Set `scope` = `REGION` (required) 16052 * Leave the `availabilityDomain` parameter empty 16053 * Set `lifetime` = `RESERVED` 16054 16055 To list the ephemeral public IPs assigned to a regional entity such as a NAT gateway: 16056 * Set `scope` = `REGION` (required) 16057 * Leave the `availabilityDomain` parameter empty 16058 * Set `lifetime` = `EPHEMERAL` 16059 16060 To list the ephemeral public IPs assigned to private IPs: 16061 * Set `scope` = `AVAILABILITY_DOMAIN` (required) 16062 * Set the `availabilityDomain` parameter to the desired availability domain (required) 16063 * Set `lifetime` = `EPHEMERAL` 16064 16065 **Note:** An ephemeral public IP assigned to a private IP 16066 is always in the same availability domain and compartment as the private IP. 16067 16068 16069 :param str scope: (required) 16070 Whether the public IP is regional or specific to a particular availability domain. 16071 16072 * `REGION`: The public IP exists within a region and is assigned to a regional entity 16073 (such as a :class:`NatGateway`), or can be assigned to a private IP 16074 in any availability domain in the region. Reserved public IPs have `scope` = `REGION`, as do 16075 ephemeral public IPs assigned to a regional entity. 16076 16077 * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity 16078 it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. 16079 Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`. 16080 16081 Allowed values are: "REGION", "AVAILABILITY_DOMAIN" 16082 16083 :param str compartment_id: (required) 16084 The `OCID`__ of the compartment. 16085 16086 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16087 16088 :param int limit: (optional) 16089 For list pagination. The maximum number of results per page, or items to return in a paginated 16090 \"List\" call. For important details about how pagination works, see 16091 `List Pagination`__. 16092 16093 Example: `50` 16094 16095 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16096 16097 :param str page: (optional) 16098 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 16099 call. For important details about how pagination works, see 16100 `List Pagination`__. 16101 16102 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16103 16104 :param str availability_domain: (optional) 16105 The name of the availability domain. 16106 16107 Example: `Uocm:PHX-AD-1` 16108 16109 :param str lifetime: (optional) 16110 A filter to return only public IPs that match given lifetime. 16111 16112 Allowed values are: "EPHEMERAL", "RESERVED" 16113 16114 :param str public_ip_pool_id: (optional) 16115 A filter to return only resources that belong to the given public IP pool. 16116 16117 :param obj retry_strategy: (optional) 16118 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16119 16120 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. 16121 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16122 16123 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16124 16125 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.PublicIp` 16126 :rtype: :class:`~oci.response.Response` 16127 16128 :example: 16129 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_public_ips.py.html>`__ to see an example of how to use list_public_ips API. 16130 """ 16131 resource_path = "/publicIps" 16132 method = "GET" 16133 16134 # Don't accept unknown kwargs 16135 expected_kwargs = [ 16136 "retry_strategy", 16137 "limit", 16138 "page", 16139 "availability_domain", 16140 "lifetime", 16141 "public_ip_pool_id" 16142 ] 16143 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16144 if extra_kwargs: 16145 raise ValueError( 16146 "list_public_ips got unknown kwargs: {!r}".format(extra_kwargs)) 16147 16148 scope_allowed_values = ["REGION", "AVAILABILITY_DOMAIN"] 16149 if scope not in scope_allowed_values: 16150 raise ValueError( 16151 "Invalid value for `scope`, must be one of {0}".format(scope_allowed_values) 16152 ) 16153 16154 if 'lifetime' in kwargs: 16155 lifetime_allowed_values = ["EPHEMERAL", "RESERVED"] 16156 if kwargs['lifetime'] not in lifetime_allowed_values: 16157 raise ValueError( 16158 "Invalid value for `lifetime`, must be one of {0}".format(lifetime_allowed_values) 16159 ) 16160 16161 query_params = { 16162 "limit": kwargs.get("limit", missing), 16163 "page": kwargs.get("page", missing), 16164 "scope": scope, 16165 "availabilityDomain": kwargs.get("availability_domain", missing), 16166 "lifetime": kwargs.get("lifetime", missing), 16167 "compartmentId": compartment_id, 16168 "publicIpPoolId": kwargs.get("public_ip_pool_id", missing) 16169 } 16170 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 16171 16172 header_params = { 16173 "accept": "application/json", 16174 "content-type": "application/json" 16175 } 16176 16177 retry_strategy = self.base_client.get_preferred_retry_strategy( 16178 operation_retry_strategy=kwargs.get('retry_strategy'), 16179 client_retry_strategy=self.retry_strategy 16180 ) 16181 16182 if retry_strategy: 16183 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16184 self.base_client.add_opc_client_retries_header(header_params) 16185 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16186 return retry_strategy.make_retrying_call( 16187 self.base_client.call_api, 16188 resource_path=resource_path, 16189 method=method, 16190 query_params=query_params, 16191 header_params=header_params, 16192 response_type="list[PublicIp]") 16193 else: 16194 return self.base_client.call_api( 16195 resource_path=resource_path, 16196 method=method, 16197 query_params=query_params, 16198 header_params=header_params, 16199 response_type="list[PublicIp]") 16200 16201 def list_remote_peering_connections(self, compartment_id, **kwargs): 16202 """ 16203 Lists the remote peering connections (RPCs) for the specified DRG and compartment 16204 (the RPC's compartment). 16205 16206 16207 :param str compartment_id: (required) 16208 The `OCID`__ of the compartment. 16209 16210 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16211 16212 :param str drg_id: (optional) 16213 The `OCID`__ of the DRG. 16214 16215 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16216 16217 :param int limit: (optional) 16218 For list pagination. The maximum number of results per page, or items to return in a paginated 16219 \"List\" call. For important details about how pagination works, see 16220 `List Pagination`__. 16221 16222 Example: `50` 16223 16224 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16225 16226 :param str page: (optional) 16227 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 16228 call. For important details about how pagination works, see 16229 `List Pagination`__. 16230 16231 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16232 16233 :param obj retry_strategy: (optional) 16234 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16235 16236 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. 16237 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16238 16239 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16240 16241 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.RemotePeeringConnection` 16242 :rtype: :class:`~oci.response.Response` 16243 16244 :example: 16245 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_remote_peering_connections.py.html>`__ to see an example of how to use list_remote_peering_connections API. 16246 """ 16247 resource_path = "/remotePeeringConnections" 16248 method = "GET" 16249 16250 # Don't accept unknown kwargs 16251 expected_kwargs = [ 16252 "retry_strategy", 16253 "drg_id", 16254 "limit", 16255 "page" 16256 ] 16257 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16258 if extra_kwargs: 16259 raise ValueError( 16260 "list_remote_peering_connections got unknown kwargs: {!r}".format(extra_kwargs)) 16261 16262 query_params = { 16263 "compartmentId": compartment_id, 16264 "drgId": kwargs.get("drg_id", missing), 16265 "limit": kwargs.get("limit", missing), 16266 "page": kwargs.get("page", missing) 16267 } 16268 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 16269 16270 header_params = { 16271 "accept": "application/json", 16272 "content-type": "application/json" 16273 } 16274 16275 retry_strategy = self.base_client.get_preferred_retry_strategy( 16276 operation_retry_strategy=kwargs.get('retry_strategy'), 16277 client_retry_strategy=self.retry_strategy 16278 ) 16279 16280 if retry_strategy: 16281 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16282 self.base_client.add_opc_client_retries_header(header_params) 16283 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16284 return retry_strategy.make_retrying_call( 16285 self.base_client.call_api, 16286 resource_path=resource_path, 16287 method=method, 16288 query_params=query_params, 16289 header_params=header_params, 16290 response_type="list[RemotePeeringConnection]") 16291 else: 16292 return self.base_client.call_api( 16293 resource_path=resource_path, 16294 method=method, 16295 query_params=query_params, 16296 header_params=header_params, 16297 response_type="list[RemotePeeringConnection]") 16298 16299 def list_route_tables(self, compartment_id, **kwargs): 16300 """ 16301 Lists the route tables in the specified VCN and specified compartment. 16302 If the VCN ID is not provided, then the list includes the route tables from all VCNs in the specified compartment. 16303 The response includes the default route table that automatically comes with 16304 each VCN in the specified compartment, plus any route tables you've created. 16305 16306 16307 :param str compartment_id: (required) 16308 The `OCID`__ of the compartment. 16309 16310 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16311 16312 :param int limit: (optional) 16313 For list pagination. The maximum number of results per page, or items to return in a paginated 16314 \"List\" call. For important details about how pagination works, see 16315 `List Pagination`__. 16316 16317 Example: `50` 16318 16319 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16320 16321 :param str page: (optional) 16322 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 16323 call. For important details about how pagination works, see 16324 `List Pagination`__. 16325 16326 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16327 16328 :param str vcn_id: (optional) 16329 The `OCID`__ of the VCN. 16330 16331 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16332 16333 :param str display_name: (optional) 16334 A filter to return only resources that match the given display name exactly. 16335 16336 :param str sort_by: (optional) 16337 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 16338 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 16339 sort order is case sensitive. 16340 16341 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 16342 optionally filter by availability domain if the scope of the resource type is within a 16343 single availability domain. If you call one of these \"List\" operations without specifying 16344 an availability domain, the resources are grouped by availability domain, then sorted. 16345 16346 Allowed values are: "TIMECREATED", "DISPLAYNAME" 16347 16348 :param str sort_order: (optional) 16349 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 16350 is case sensitive. 16351 16352 Allowed values are: "ASC", "DESC" 16353 16354 :param str lifecycle_state: (optional) 16355 A filter to only return resources that match the given lifecycle 16356 state. The state value is case-insensitive. 16357 16358 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" 16359 16360 :param obj retry_strategy: (optional) 16361 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16362 16363 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. 16364 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16365 16366 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16367 16368 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.RouteTable` 16369 :rtype: :class:`~oci.response.Response` 16370 16371 :example: 16372 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_route_tables.py.html>`__ to see an example of how to use list_route_tables API. 16373 """ 16374 resource_path = "/routeTables" 16375 method = "GET" 16376 16377 # Don't accept unknown kwargs 16378 expected_kwargs = [ 16379 "retry_strategy", 16380 "limit", 16381 "page", 16382 "vcn_id", 16383 "display_name", 16384 "sort_by", 16385 "sort_order", 16386 "lifecycle_state" 16387 ] 16388 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16389 if extra_kwargs: 16390 raise ValueError( 16391 "list_route_tables got unknown kwargs: {!r}".format(extra_kwargs)) 16392 16393 if 'sort_by' in kwargs: 16394 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 16395 if kwargs['sort_by'] not in sort_by_allowed_values: 16396 raise ValueError( 16397 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 16398 ) 16399 16400 if 'sort_order' in kwargs: 16401 sort_order_allowed_values = ["ASC", "DESC"] 16402 if kwargs['sort_order'] not in sort_order_allowed_values: 16403 raise ValueError( 16404 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 16405 ) 16406 16407 if 'lifecycle_state' in kwargs: 16408 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"] 16409 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 16410 raise ValueError( 16411 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 16412 ) 16413 16414 query_params = { 16415 "compartmentId": compartment_id, 16416 "limit": kwargs.get("limit", missing), 16417 "page": kwargs.get("page", missing), 16418 "vcnId": kwargs.get("vcn_id", missing), 16419 "displayName": kwargs.get("display_name", missing), 16420 "sortBy": kwargs.get("sort_by", missing), 16421 "sortOrder": kwargs.get("sort_order", missing), 16422 "lifecycleState": kwargs.get("lifecycle_state", missing) 16423 } 16424 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 16425 16426 header_params = { 16427 "accept": "application/json", 16428 "content-type": "application/json" 16429 } 16430 16431 retry_strategy = self.base_client.get_preferred_retry_strategy( 16432 operation_retry_strategy=kwargs.get('retry_strategy'), 16433 client_retry_strategy=self.retry_strategy 16434 ) 16435 16436 if retry_strategy: 16437 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16438 self.base_client.add_opc_client_retries_header(header_params) 16439 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16440 return retry_strategy.make_retrying_call( 16441 self.base_client.call_api, 16442 resource_path=resource_path, 16443 method=method, 16444 query_params=query_params, 16445 header_params=header_params, 16446 response_type="list[RouteTable]") 16447 else: 16448 return self.base_client.call_api( 16449 resource_path=resource_path, 16450 method=method, 16451 query_params=query_params, 16452 header_params=header_params, 16453 response_type="list[RouteTable]") 16454 16455 def list_security_lists(self, compartment_id, **kwargs): 16456 """ 16457 Lists the security lists in the specified VCN and compartment. 16458 If the VCN ID is not provided, then the list includes the security lists from all VCNs in the specified compartment. 16459 16460 16461 :param str compartment_id: (required) 16462 The `OCID`__ of the compartment. 16463 16464 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16465 16466 :param int limit: (optional) 16467 For list pagination. The maximum number of results per page, or items to return in a paginated 16468 \"List\" call. For important details about how pagination works, see 16469 `List Pagination`__. 16470 16471 Example: `50` 16472 16473 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16474 16475 :param str page: (optional) 16476 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 16477 call. For important details about how pagination works, see 16478 `List Pagination`__. 16479 16480 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16481 16482 :param str vcn_id: (optional) 16483 The `OCID`__ of the VCN. 16484 16485 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16486 16487 :param str display_name: (optional) 16488 A filter to return only resources that match the given display name exactly. 16489 16490 :param str sort_by: (optional) 16491 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 16492 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 16493 sort order is case sensitive. 16494 16495 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 16496 optionally filter by availability domain if the scope of the resource type is within a 16497 single availability domain. If you call one of these \"List\" operations without specifying 16498 an availability domain, the resources are grouped by availability domain, then sorted. 16499 16500 Allowed values are: "TIMECREATED", "DISPLAYNAME" 16501 16502 :param str sort_order: (optional) 16503 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 16504 is case sensitive. 16505 16506 Allowed values are: "ASC", "DESC" 16507 16508 :param str lifecycle_state: (optional) 16509 A filter to only return resources that match the given lifecycle 16510 state. The state value is case-insensitive. 16511 16512 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" 16513 16514 :param obj retry_strategy: (optional) 16515 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16516 16517 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. 16518 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16519 16520 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16521 16522 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.SecurityList` 16523 :rtype: :class:`~oci.response.Response` 16524 16525 :example: 16526 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_security_lists.py.html>`__ to see an example of how to use list_security_lists API. 16527 """ 16528 resource_path = "/securityLists" 16529 method = "GET" 16530 16531 # Don't accept unknown kwargs 16532 expected_kwargs = [ 16533 "retry_strategy", 16534 "limit", 16535 "page", 16536 "vcn_id", 16537 "display_name", 16538 "sort_by", 16539 "sort_order", 16540 "lifecycle_state" 16541 ] 16542 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16543 if extra_kwargs: 16544 raise ValueError( 16545 "list_security_lists got unknown kwargs: {!r}".format(extra_kwargs)) 16546 16547 if 'sort_by' in kwargs: 16548 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 16549 if kwargs['sort_by'] not in sort_by_allowed_values: 16550 raise ValueError( 16551 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 16552 ) 16553 16554 if 'sort_order' in kwargs: 16555 sort_order_allowed_values = ["ASC", "DESC"] 16556 if kwargs['sort_order'] not in sort_order_allowed_values: 16557 raise ValueError( 16558 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 16559 ) 16560 16561 if 'lifecycle_state' in kwargs: 16562 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"] 16563 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 16564 raise ValueError( 16565 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 16566 ) 16567 16568 query_params = { 16569 "compartmentId": compartment_id, 16570 "limit": kwargs.get("limit", missing), 16571 "page": kwargs.get("page", missing), 16572 "vcnId": kwargs.get("vcn_id", missing), 16573 "displayName": kwargs.get("display_name", missing), 16574 "sortBy": kwargs.get("sort_by", missing), 16575 "sortOrder": kwargs.get("sort_order", missing), 16576 "lifecycleState": kwargs.get("lifecycle_state", missing) 16577 } 16578 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 16579 16580 header_params = { 16581 "accept": "application/json", 16582 "content-type": "application/json" 16583 } 16584 16585 retry_strategy = self.base_client.get_preferred_retry_strategy( 16586 operation_retry_strategy=kwargs.get('retry_strategy'), 16587 client_retry_strategy=self.retry_strategy 16588 ) 16589 16590 if retry_strategy: 16591 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16592 self.base_client.add_opc_client_retries_header(header_params) 16593 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16594 return retry_strategy.make_retrying_call( 16595 self.base_client.call_api, 16596 resource_path=resource_path, 16597 method=method, 16598 query_params=query_params, 16599 header_params=header_params, 16600 response_type="list[SecurityList]") 16601 else: 16602 return self.base_client.call_api( 16603 resource_path=resource_path, 16604 method=method, 16605 query_params=query_params, 16606 header_params=header_params, 16607 response_type="list[SecurityList]") 16608 16609 def list_service_gateways(self, compartment_id, **kwargs): 16610 """ 16611 Lists the service gateways in the specified compartment. You may optionally specify a VCN OCID 16612 to filter the results by VCN. 16613 16614 16615 :param str compartment_id: (required) 16616 The `OCID`__ of the compartment. 16617 16618 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16619 16620 :param str vcn_id: (optional) 16621 The `OCID`__ of the VCN. 16622 16623 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16624 16625 :param int limit: (optional) 16626 For list pagination. The maximum number of results per page, or items to return in a paginated 16627 \"List\" call. For important details about how pagination works, see 16628 `List Pagination`__. 16629 16630 Example: `50` 16631 16632 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16633 16634 :param str page: (optional) 16635 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 16636 call. For important details about how pagination works, see 16637 `List Pagination`__. 16638 16639 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16640 16641 :param str sort_by: (optional) 16642 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 16643 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 16644 sort order is case sensitive. 16645 16646 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 16647 optionally filter by availability domain if the scope of the resource type is within a 16648 single availability domain. If you call one of these \"List\" operations without specifying 16649 an availability domain, the resources are grouped by availability domain, then sorted. 16650 16651 Allowed values are: "TIMECREATED", "DISPLAYNAME" 16652 16653 :param str sort_order: (optional) 16654 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 16655 is case sensitive. 16656 16657 Allowed values are: "ASC", "DESC" 16658 16659 :param str lifecycle_state: (optional) 16660 A filter to return only resources that match the given lifecycle 16661 state. The state value is case-insensitive. 16662 16663 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" 16664 16665 :param obj retry_strategy: (optional) 16666 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16667 16668 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. 16669 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16670 16671 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16672 16673 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.ServiceGateway` 16674 :rtype: :class:`~oci.response.Response` 16675 16676 :example: 16677 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_service_gateways.py.html>`__ to see an example of how to use list_service_gateways API. 16678 """ 16679 resource_path = "/serviceGateways" 16680 method = "GET" 16681 16682 # Don't accept unknown kwargs 16683 expected_kwargs = [ 16684 "retry_strategy", 16685 "vcn_id", 16686 "limit", 16687 "page", 16688 "sort_by", 16689 "sort_order", 16690 "lifecycle_state" 16691 ] 16692 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16693 if extra_kwargs: 16694 raise ValueError( 16695 "list_service_gateways got unknown kwargs: {!r}".format(extra_kwargs)) 16696 16697 if 'sort_by' in kwargs: 16698 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 16699 if kwargs['sort_by'] not in sort_by_allowed_values: 16700 raise ValueError( 16701 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 16702 ) 16703 16704 if 'sort_order' in kwargs: 16705 sort_order_allowed_values = ["ASC", "DESC"] 16706 if kwargs['sort_order'] not in sort_order_allowed_values: 16707 raise ValueError( 16708 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 16709 ) 16710 16711 if 'lifecycle_state' in kwargs: 16712 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"] 16713 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 16714 raise ValueError( 16715 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 16716 ) 16717 16718 query_params = { 16719 "compartmentId": compartment_id, 16720 "vcnId": kwargs.get("vcn_id", missing), 16721 "limit": kwargs.get("limit", missing), 16722 "page": kwargs.get("page", missing), 16723 "sortBy": kwargs.get("sort_by", missing), 16724 "sortOrder": kwargs.get("sort_order", missing), 16725 "lifecycleState": kwargs.get("lifecycle_state", missing) 16726 } 16727 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 16728 16729 header_params = { 16730 "accept": "application/json", 16731 "content-type": "application/json" 16732 } 16733 16734 retry_strategy = self.base_client.get_preferred_retry_strategy( 16735 operation_retry_strategy=kwargs.get('retry_strategy'), 16736 client_retry_strategy=self.retry_strategy 16737 ) 16738 16739 if retry_strategy: 16740 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16741 self.base_client.add_opc_client_retries_header(header_params) 16742 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16743 return retry_strategy.make_retrying_call( 16744 self.base_client.call_api, 16745 resource_path=resource_path, 16746 method=method, 16747 query_params=query_params, 16748 header_params=header_params, 16749 response_type="list[ServiceGateway]") 16750 else: 16751 return self.base_client.call_api( 16752 resource_path=resource_path, 16753 method=method, 16754 query_params=query_params, 16755 header_params=header_params, 16756 response_type="list[ServiceGateway]") 16757 16758 def list_services(self, **kwargs): 16759 """ 16760 Lists the available :class:`Service` objects that you can enable for a 16761 service gateway in this region. 16762 16763 16764 :param int limit: (optional) 16765 For list pagination. The maximum number of results per page, or items to return in a paginated 16766 \"List\" call. For important details about how pagination works, see 16767 `List Pagination`__. 16768 16769 Example: `50` 16770 16771 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16772 16773 :param str page: (optional) 16774 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 16775 call. For important details about how pagination works, see 16776 `List Pagination`__. 16777 16778 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16779 16780 :param obj retry_strategy: (optional) 16781 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16782 16783 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. 16784 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16785 16786 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16787 16788 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Service` 16789 :rtype: :class:`~oci.response.Response` 16790 16791 :example: 16792 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_services.py.html>`__ to see an example of how to use list_services API. 16793 """ 16794 resource_path = "/services" 16795 method = "GET" 16796 16797 # Don't accept unknown kwargs 16798 expected_kwargs = [ 16799 "retry_strategy", 16800 "limit", 16801 "page" 16802 ] 16803 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16804 if extra_kwargs: 16805 raise ValueError( 16806 "list_services got unknown kwargs: {!r}".format(extra_kwargs)) 16807 16808 query_params = { 16809 "limit": kwargs.get("limit", missing), 16810 "page": kwargs.get("page", missing) 16811 } 16812 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 16813 16814 header_params = { 16815 "accept": "application/json", 16816 "content-type": "application/json" 16817 } 16818 16819 retry_strategy = self.base_client.get_preferred_retry_strategy( 16820 operation_retry_strategy=kwargs.get('retry_strategy'), 16821 client_retry_strategy=self.retry_strategy 16822 ) 16823 16824 if retry_strategy: 16825 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16826 self.base_client.add_opc_client_retries_header(header_params) 16827 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16828 return retry_strategy.make_retrying_call( 16829 self.base_client.call_api, 16830 resource_path=resource_path, 16831 method=method, 16832 query_params=query_params, 16833 header_params=header_params, 16834 response_type="list[Service]") 16835 else: 16836 return self.base_client.call_api( 16837 resource_path=resource_path, 16838 method=method, 16839 query_params=query_params, 16840 header_params=header_params, 16841 response_type="list[Service]") 16842 16843 def list_subnets(self, compartment_id, **kwargs): 16844 """ 16845 Lists the subnets in the specified VCN and the specified compartment. 16846 If the VCN ID is not provided, then the list includes the subnets from all VCNs in the specified compartment. 16847 16848 16849 :param str compartment_id: (required) 16850 The `OCID`__ of the compartment. 16851 16852 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16853 16854 :param int limit: (optional) 16855 For list pagination. The maximum number of results per page, or items to return in a paginated 16856 \"List\" call. For important details about how pagination works, see 16857 `List Pagination`__. 16858 16859 Example: `50` 16860 16861 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16862 16863 :param str page: (optional) 16864 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 16865 call. For important details about how pagination works, see 16866 `List Pagination`__. 16867 16868 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 16869 16870 :param str vcn_id: (optional) 16871 The `OCID`__ of the VCN. 16872 16873 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 16874 16875 :param str display_name: (optional) 16876 A filter to return only resources that match the given display name exactly. 16877 16878 :param str sort_by: (optional) 16879 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 16880 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 16881 sort order is case sensitive. 16882 16883 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 16884 optionally filter by availability domain if the scope of the resource type is within a 16885 single availability domain. If you call one of these \"List\" operations without specifying 16886 an availability domain, the resources are grouped by availability domain, then sorted. 16887 16888 Allowed values are: "TIMECREATED", "DISPLAYNAME" 16889 16890 :param str sort_order: (optional) 16891 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 16892 is case sensitive. 16893 16894 Allowed values are: "ASC", "DESC" 16895 16896 :param str lifecycle_state: (optional) 16897 A filter to only return resources that match the given lifecycle 16898 state. The state value is case-insensitive. 16899 16900 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", "UPDATING" 16901 16902 :param obj retry_strategy: (optional) 16903 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16904 16905 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. 16906 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16907 16908 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16909 16910 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Subnet` 16911 :rtype: :class:`~oci.response.Response` 16912 16913 :example: 16914 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_subnets.py.html>`__ to see an example of how to use list_subnets API. 16915 """ 16916 resource_path = "/subnets" 16917 method = "GET" 16918 16919 # Don't accept unknown kwargs 16920 expected_kwargs = [ 16921 "retry_strategy", 16922 "limit", 16923 "page", 16924 "vcn_id", 16925 "display_name", 16926 "sort_by", 16927 "sort_order", 16928 "lifecycle_state" 16929 ] 16930 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16931 if extra_kwargs: 16932 raise ValueError( 16933 "list_subnets got unknown kwargs: {!r}".format(extra_kwargs)) 16934 16935 if 'sort_by' in kwargs: 16936 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 16937 if kwargs['sort_by'] not in sort_by_allowed_values: 16938 raise ValueError( 16939 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 16940 ) 16941 16942 if 'sort_order' in kwargs: 16943 sort_order_allowed_values = ["ASC", "DESC"] 16944 if kwargs['sort_order'] not in sort_order_allowed_values: 16945 raise ValueError( 16946 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 16947 ) 16948 16949 if 'lifecycle_state' in kwargs: 16950 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", "UPDATING"] 16951 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 16952 raise ValueError( 16953 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 16954 ) 16955 16956 query_params = { 16957 "compartmentId": compartment_id, 16958 "limit": kwargs.get("limit", missing), 16959 "page": kwargs.get("page", missing), 16960 "vcnId": kwargs.get("vcn_id", missing), 16961 "displayName": kwargs.get("display_name", missing), 16962 "sortBy": kwargs.get("sort_by", missing), 16963 "sortOrder": kwargs.get("sort_order", missing), 16964 "lifecycleState": kwargs.get("lifecycle_state", missing) 16965 } 16966 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 16967 16968 header_params = { 16969 "accept": "application/json", 16970 "content-type": "application/json" 16971 } 16972 16973 retry_strategy = self.base_client.get_preferred_retry_strategy( 16974 operation_retry_strategy=kwargs.get('retry_strategy'), 16975 client_retry_strategy=self.retry_strategy 16976 ) 16977 16978 if retry_strategy: 16979 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16980 self.base_client.add_opc_client_retries_header(header_params) 16981 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16982 return retry_strategy.make_retrying_call( 16983 self.base_client.call_api, 16984 resource_path=resource_path, 16985 method=method, 16986 query_params=query_params, 16987 header_params=header_params, 16988 response_type="list[Subnet]") 16989 else: 16990 return self.base_client.call_api( 16991 resource_path=resource_path, 16992 method=method, 16993 query_params=query_params, 16994 header_params=header_params, 16995 response_type="list[Subnet]") 16996 16997 def list_vcns(self, compartment_id, **kwargs): 16998 """ 16999 Lists the virtual cloud networks (VCNs) in the specified compartment. 17000 17001 17002 :param str compartment_id: (required) 17003 The `OCID`__ of the compartment. 17004 17005 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17006 17007 :param int limit: (optional) 17008 For list pagination. The maximum number of results per page, or items to return in a paginated 17009 \"List\" call. For important details about how pagination works, see 17010 `List Pagination`__. 17011 17012 Example: `50` 17013 17014 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 17015 17016 :param str page: (optional) 17017 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 17018 call. For important details about how pagination works, see 17019 `List Pagination`__. 17020 17021 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 17022 17023 :param str display_name: (optional) 17024 A filter to return only resources that match the given display name exactly. 17025 17026 :param str sort_by: (optional) 17027 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 17028 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 17029 sort order is case sensitive. 17030 17031 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 17032 optionally filter by availability domain if the scope of the resource type is within a 17033 single availability domain. If you call one of these \"List\" operations without specifying 17034 an availability domain, the resources are grouped by availability domain, then sorted. 17035 17036 Allowed values are: "TIMECREATED", "DISPLAYNAME" 17037 17038 :param str sort_order: (optional) 17039 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 17040 is case sensitive. 17041 17042 Allowed values are: "ASC", "DESC" 17043 17044 :param str lifecycle_state: (optional) 17045 A filter to only return resources that match the given lifecycle 17046 state. The state value is case-insensitive. 17047 17048 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", "UPDATING" 17049 17050 :param obj retry_strategy: (optional) 17051 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 17052 17053 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. 17054 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 17055 17056 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 17057 17058 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Vcn` 17059 :rtype: :class:`~oci.response.Response` 17060 17061 :example: 17062 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_vcns.py.html>`__ to see an example of how to use list_vcns API. 17063 """ 17064 resource_path = "/vcns" 17065 method = "GET" 17066 17067 # Don't accept unknown kwargs 17068 expected_kwargs = [ 17069 "retry_strategy", 17070 "limit", 17071 "page", 17072 "display_name", 17073 "sort_by", 17074 "sort_order", 17075 "lifecycle_state" 17076 ] 17077 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 17078 if extra_kwargs: 17079 raise ValueError( 17080 "list_vcns got unknown kwargs: {!r}".format(extra_kwargs)) 17081 17082 if 'sort_by' in kwargs: 17083 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 17084 if kwargs['sort_by'] not in sort_by_allowed_values: 17085 raise ValueError( 17086 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 17087 ) 17088 17089 if 'sort_order' in kwargs: 17090 sort_order_allowed_values = ["ASC", "DESC"] 17091 if kwargs['sort_order'] not in sort_order_allowed_values: 17092 raise ValueError( 17093 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 17094 ) 17095 17096 if 'lifecycle_state' in kwargs: 17097 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", "UPDATING"] 17098 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 17099 raise ValueError( 17100 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 17101 ) 17102 17103 query_params = { 17104 "compartmentId": compartment_id, 17105 "limit": kwargs.get("limit", missing), 17106 "page": kwargs.get("page", missing), 17107 "displayName": kwargs.get("display_name", missing), 17108 "sortBy": kwargs.get("sort_by", missing), 17109 "sortOrder": kwargs.get("sort_order", missing), 17110 "lifecycleState": kwargs.get("lifecycle_state", missing) 17111 } 17112 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 17113 17114 header_params = { 17115 "accept": "application/json", 17116 "content-type": "application/json" 17117 } 17118 17119 retry_strategy = self.base_client.get_preferred_retry_strategy( 17120 operation_retry_strategy=kwargs.get('retry_strategy'), 17121 client_retry_strategy=self.retry_strategy 17122 ) 17123 17124 if retry_strategy: 17125 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 17126 self.base_client.add_opc_client_retries_header(header_params) 17127 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 17128 return retry_strategy.make_retrying_call( 17129 self.base_client.call_api, 17130 resource_path=resource_path, 17131 method=method, 17132 query_params=query_params, 17133 header_params=header_params, 17134 response_type="list[Vcn]") 17135 else: 17136 return self.base_client.call_api( 17137 resource_path=resource_path, 17138 method=method, 17139 query_params=query_params, 17140 header_params=header_params, 17141 response_type="list[Vcn]") 17142 17143 def list_virtual_circuit_bandwidth_shapes(self, compartment_id, **kwargs): 17144 """ 17145 The deprecated operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the `OCID`__ of your tenancy (the root compartment). 17146 17147 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17148 17149 17150 :param str compartment_id: (required) 17151 The `OCID`__ of the compartment. 17152 17153 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17154 17155 :param int limit: (optional) 17156 For list pagination. The maximum number of results per page, or items to return in a paginated 17157 \"List\" call. For important details about how pagination works, see 17158 `List Pagination`__. 17159 17160 Example: `50` 17161 17162 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 17163 17164 :param str page: (optional) 17165 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 17166 call. For important details about how pagination works, see 17167 `List Pagination`__. 17168 17169 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 17170 17171 :param obj retry_strategy: (optional) 17172 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 17173 17174 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. 17175 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 17176 17177 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 17178 17179 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.VirtualCircuitBandwidthShape` 17180 :rtype: :class:`~oci.response.Response` 17181 17182 :example: 17183 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_virtual_circuit_bandwidth_shapes.py.html>`__ to see an example of how to use list_virtual_circuit_bandwidth_shapes API. 17184 """ 17185 resource_path = "/virtualCircuitBandwidthShapes" 17186 method = "GET" 17187 17188 # Don't accept unknown kwargs 17189 expected_kwargs = [ 17190 "retry_strategy", 17191 "limit", 17192 "page" 17193 ] 17194 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 17195 if extra_kwargs: 17196 raise ValueError( 17197 "list_virtual_circuit_bandwidth_shapes got unknown kwargs: {!r}".format(extra_kwargs)) 17198 17199 query_params = { 17200 "compartmentId": compartment_id, 17201 "limit": kwargs.get("limit", missing), 17202 "page": kwargs.get("page", missing) 17203 } 17204 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 17205 17206 header_params = { 17207 "accept": "application/json", 17208 "content-type": "application/json" 17209 } 17210 17211 retry_strategy = self.base_client.get_preferred_retry_strategy( 17212 operation_retry_strategy=kwargs.get('retry_strategy'), 17213 client_retry_strategy=self.retry_strategy 17214 ) 17215 17216 if retry_strategy: 17217 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 17218 self.base_client.add_opc_client_retries_header(header_params) 17219 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 17220 return retry_strategy.make_retrying_call( 17221 self.base_client.call_api, 17222 resource_path=resource_path, 17223 method=method, 17224 query_params=query_params, 17225 header_params=header_params, 17226 response_type="list[VirtualCircuitBandwidthShape]") 17227 else: 17228 return self.base_client.call_api( 17229 resource_path=resource_path, 17230 method=method, 17231 query_params=query_params, 17232 header_params=header_params, 17233 response_type="list[VirtualCircuitBandwidthShape]") 17234 17235 def list_virtual_circuit_public_prefixes(self, virtual_circuit_id, **kwargs): 17236 """ 17237 Lists the public IP prefixes and their details for the specified 17238 public virtual circuit. 17239 17240 17241 :param str virtual_circuit_id: (required) 17242 The `OCID`__ of the virtual circuit. 17243 17244 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 17245 17246 :param str verification_state: (optional) 17247 A filter to only return resources that match the given verification 17248 state. 17249 17250 The state value is case-insensitive. 17251 17252 Allowed values are: "IN_PROGRESS", "COMPLETED", "FAILED" 17253 17254 :param obj retry_strategy: (optional) 17255 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 17256 17257 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. 17258 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 17259 17260 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 17261 17262 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.VirtualCircuitPublicPrefix` 17263 :rtype: :class:`~oci.response.Response` 17264 17265 :example: 17266 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_virtual_circuit_public_prefixes.py.html>`__ to see an example of how to use list_virtual_circuit_public_prefixes API. 17267 """ 17268 resource_path = "/virtualCircuits/{virtualCircuitId}/publicPrefixes" 17269 method = "GET" 17270 17271 # Don't accept unknown kwargs 17272 expected_kwargs = [ 17273 "retry_strategy", 17274 "verification_state" 17275 ] 17276 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 17277 if extra_kwargs: 17278 raise ValueError( 17279 "list_virtual_circuit_public_prefixes got unknown kwargs: {!r}".format(extra_kwargs)) 17280 17281 path_params = { 17282 "virtualCircuitId": virtual_circuit_id 17283 } 17284 17285 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 17286 17287 for (k, v) in six.iteritems(path_params): 17288 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 17289 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 17290 17291 if 'verification_state' in kwargs: 17292 verification_state_allowed_values = ["IN_PROGRESS", "COMPLETED", "FAILED"] 17293 if kwargs['verification_state'] not in verification_state_allowed_values: 17294 raise ValueError( 17295 "Invalid value for `verification_state`, must be one of {0}".format(verification_state_allowed_values) 17296 ) 17297 17298 query_params = { 17299 "verificationState": kwargs.get("verification_state", missing) 17300 } 17301 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 17302 17303 header_params = { 17304 "accept": "application/json", 17305 "content-type": "application/json" 17306 } 17307 17308 retry_strategy = self.base_client.get_preferred_retry_strategy( 17309 operation_retry_strategy=kwargs.get('retry_strategy'), 17310 client_retry_strategy=self.retry_strategy 17311 ) 17312 17313 if retry_strategy: 17314 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 17315 self.base_client.add_opc_client_retries_header(header_params) 17316 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 17317 return retry_strategy.make_retrying_call( 17318 self.base_client.call_api, 17319 resource_path=resource_path, 17320 method=method, 17321 path_params=path_params, 17322 query_params=query_params, 17323 header_params=header_params, 17324 response_type="list[VirtualCircuitPublicPrefix]") 17325 else: 17326 return self.base_client.call_api( 17327 resource_path=resource_path, 17328 method=method, 17329 path_params=path_params, 17330 query_params=query_params, 17331 header_params=header_params, 17332 response_type="list[VirtualCircuitPublicPrefix]") 17333 17334 def list_virtual_circuits(self, compartment_id, **kwargs): 17335 """ 17336 Lists the virtual circuits in the specified compartment. 17337 17338 17339 :param str compartment_id: (required) 17340 The `OCID`__ of the compartment. 17341 17342 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17343 17344 :param int limit: (optional) 17345 For list pagination. The maximum number of results per page, or items to return in a paginated 17346 \"List\" call. For important details about how pagination works, see 17347 `List Pagination`__. 17348 17349 Example: `50` 17350 17351 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 17352 17353 :param str page: (optional) 17354 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 17355 call. For important details about how pagination works, see 17356 `List Pagination`__. 17357 17358 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 17359 17360 :param str display_name: (optional) 17361 A filter to return only resources that match the given display name exactly. 17362 17363 :param str sort_by: (optional) 17364 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 17365 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 17366 sort order is case sensitive. 17367 17368 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 17369 optionally filter by availability domain if the scope of the resource type is within a 17370 single availability domain. If you call one of these \"List\" operations without specifying 17371 an availability domain, the resources are grouped by availability domain, then sorted. 17372 17373 Allowed values are: "TIMECREATED", "DISPLAYNAME" 17374 17375 :param str sort_order: (optional) 17376 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 17377 is case sensitive. 17378 17379 Allowed values are: "ASC", "DESC" 17380 17381 :param str lifecycle_state: (optional) 17382 A filter to return only resources that match the specified lifecycle 17383 state. The value is case insensitive. 17384 17385 Allowed values are: "PENDING_PROVIDER", "VERIFYING", "PROVISIONING", "PROVISIONED", "FAILED", "INACTIVE", "TERMINATING", "TERMINATED" 17386 17387 :param obj retry_strategy: (optional) 17388 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 17389 17390 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. 17391 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 17392 17393 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 17394 17395 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.VirtualCircuit` 17396 :rtype: :class:`~oci.response.Response` 17397 17398 :example: 17399 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_virtual_circuits.py.html>`__ to see an example of how to use list_virtual_circuits API. 17400 """ 17401 resource_path = "/virtualCircuits" 17402 method = "GET" 17403 17404 # Don't accept unknown kwargs 17405 expected_kwargs = [ 17406 "retry_strategy", 17407 "limit", 17408 "page", 17409 "display_name", 17410 "sort_by", 17411 "sort_order", 17412 "lifecycle_state" 17413 ] 17414 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 17415 if extra_kwargs: 17416 raise ValueError( 17417 "list_virtual_circuits got unknown kwargs: {!r}".format(extra_kwargs)) 17418 17419 if 'sort_by' in kwargs: 17420 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 17421 if kwargs['sort_by'] not in sort_by_allowed_values: 17422 raise ValueError( 17423 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 17424 ) 17425 17426 if 'sort_order' in kwargs: 17427 sort_order_allowed_values = ["ASC", "DESC"] 17428 if kwargs['sort_order'] not in sort_order_allowed_values: 17429 raise ValueError( 17430 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 17431 ) 17432 17433 if 'lifecycle_state' in kwargs: 17434 lifecycle_state_allowed_values = ["PENDING_PROVIDER", "VERIFYING", "PROVISIONING", "PROVISIONED", "FAILED", "INACTIVE", "TERMINATING", "TERMINATED"] 17435 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 17436 raise ValueError( 17437 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 17438 ) 17439 17440 query_params = { 17441 "compartmentId": compartment_id, 17442 "limit": kwargs.get("limit", missing), 17443 "page": kwargs.get("page", missing), 17444 "displayName": kwargs.get("display_name", missing), 17445 "sortBy": kwargs.get("sort_by", missing), 17446 "sortOrder": kwargs.get("sort_order", missing), 17447 "lifecycleState": kwargs.get("lifecycle_state", missing) 17448 } 17449 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 17450 17451 header_params = { 17452 "accept": "application/json", 17453 "content-type": "application/json" 17454 } 17455 17456 retry_strategy = self.base_client.get_preferred_retry_strategy( 17457 operation_retry_strategy=kwargs.get('retry_strategy'), 17458 client_retry_strategy=self.retry_strategy 17459 ) 17460 17461 if retry_strategy: 17462 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 17463 self.base_client.add_opc_client_retries_header(header_params) 17464 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 17465 return retry_strategy.make_retrying_call( 17466 self.base_client.call_api, 17467 resource_path=resource_path, 17468 method=method, 17469 query_params=query_params, 17470 header_params=header_params, 17471 response_type="list[VirtualCircuit]") 17472 else: 17473 return self.base_client.call_api( 17474 resource_path=resource_path, 17475 method=method, 17476 query_params=query_params, 17477 header_params=header_params, 17478 response_type="list[VirtualCircuit]") 17479 17480 def list_vlans(self, compartment_id, **kwargs): 17481 """ 17482 Lists the VLANs in the specified VCN and the specified compartment. 17483 17484 17485 :param str compartment_id: (required) 17486 The `OCID`__ of the compartment. 17487 17488 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17489 17490 :param int limit: (optional) 17491 For list pagination. The maximum number of results per page, or items to return in a paginated 17492 \"List\" call. For important details about how pagination works, see 17493 `List Pagination`__. 17494 17495 Example: `50` 17496 17497 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 17498 17499 :param str page: (optional) 17500 For list pagination. The value of the `opc-next-page` response header from the previous \"List\" 17501 call. For important details about how pagination works, see 17502 `List Pagination`__. 17503 17504 __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine 17505 17506 :param str vcn_id: (optional) 17507 The `OCID`__ of the VCN. 17508 17509 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17510 17511 :param str display_name: (optional) 17512 A filter to return only resources that match the given display name exactly. 17513 17514 :param str sort_by: (optional) 17515 The field to sort by. You can provide one sort order (`sortOrder`). Default order for 17516 TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 17517 sort order is case sensitive. 17518 17519 **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you 17520 optionally filter by availability domain if the scope of the resource type is within a 17521 single availability domain. If you call one of these \"List\" operations without specifying 17522 an availability domain, the resources are grouped by availability domain, then sorted. 17523 17524 Allowed values are: "TIMECREATED", "DISPLAYNAME" 17525 17526 :param str sort_order: (optional) 17527 The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 17528 is case sensitive. 17529 17530 Allowed values are: "ASC", "DESC" 17531 17532 :param str opc_request_id: (optional) 17533 Unique identifier for the request. 17534 If you need to contact Oracle about a particular request, please provide the request ID. 17535 17536 :param str lifecycle_state: (optional) 17537 A filter to only return resources that match the given lifecycle 17538 state. The state value is case-insensitive. 17539 17540 Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", "UPDATING" 17541 17542 :param obj retry_strategy: (optional) 17543 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 17544 17545 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. 17546 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 17547 17548 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 17549 17550 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Vlan` 17551 :rtype: :class:`~oci.response.Response` 17552 17553 :example: 17554 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_vlans.py.html>`__ to see an example of how to use list_vlans API. 17555 """ 17556 resource_path = "/vlans" 17557 method = "GET" 17558 17559 # Don't accept unknown kwargs 17560 expected_kwargs = [ 17561 "retry_strategy", 17562 "limit", 17563 "page", 17564 "vcn_id", 17565 "display_name", 17566 "sort_by", 17567 "sort_order", 17568 "opc_request_id", 17569 "lifecycle_state" 17570 ] 17571 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 17572 if extra_kwargs: 17573 raise ValueError( 17574 "list_vlans got unknown kwargs: {!r}".format(extra_kwargs)) 17575 17576 if 'sort_by' in kwargs: 17577 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 17578 if kwargs['sort_by'] not in sort_by_allowed_values: 17579 raise ValueError( 17580 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 17581 ) 17582 17583 if 'sort_order' in kwargs: 17584 sort_order_allowed_values = ["ASC", "DESC"] 17585 if kwargs['sort_order'] not in sort_order_allowed_values: 17586 raise ValueError( 17587 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 17588 ) 17589 17590 if 'lifecycle_state' in kwargs: 17591 lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", "UPDATING"] 17592 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 17593 raise ValueError( 17594 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 17595 ) 17596 17597 query_params = { 17598 "compartmentId": compartment_id, 17599 "limit": kwargs.get("limit", missing), 17600 "page": kwargs.get("page", missing), 17601 "vcnId": kwargs.get("vcn_id", missing), 17602 "displayName": kwargs.get("display_name", missing), 17603 "sortBy": kwargs.get("sort_by", missing), 17604 "sortOrder": kwargs.get("sort_order", missing), 17605 "lifecycleState": kwargs.get("lifecycle_state", missing) 17606 } 17607 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 17608 17609 header_params = { 17610 "accept": "application/json", 17611 "content-type": "application/json", 17612 "opc-request-id": kwargs.get("opc_request_id", missing) 17613 } 17614 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 17615 17616 retry_strategy = self.base_client.get_preferred_retry_strategy( 17617 operation_retry_strategy=kwargs.get('retry_strategy'), 17618 client_retry_strategy=self.retry_strategy 17619 ) 17620 17621 if retry_strategy: 17622 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 17623 self.base_client.add_opc_client_retries_header(header_params) 17624 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 17625 return retry_strategy.make_retrying_call( 17626 self.base_client.call_api, 17627 resource_path=resource_path, 17628 method=method, 17629 query_params=query_params, 17630 header_params=header_params, 17631 response_type="list[Vlan]") 17632 else: 17633 return self.base_client.call_api( 17634 resource_path=resource_path, 17635 method=method, 17636 query_params=query_params, 17637 header_params=header_params, 17638 response_type="list[Vlan]") 17639 17640 def modify_vcn_cidr(self, vcn_id, modify_vcn_cidr_details, **kwargs): 17641 """ 17642 Updates the specified CIDR block of a VCN. The new CIDR IP range must meet the following criteria: 17643 17644 - Must be valid. 17645 - Must not overlap with another CIDR block in the VCN, a CIDR block of a peered VCN, or the on-premises network CIDR block. 17646 - Must not exceed the limit of CIDR blocks allowed per VCN. 17647 - Must include IP addresses from the original CIDR block that are used in the VCN's existing route rules. 17648 - No IP address in an existing subnet should be outside of the new CIDR block range. 17649 17650 **Note:** Modifying a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can vary depending on the size of your network. Updating a small network could take about a minute, and updating a large network could take up to an hour. You can use the `GetWorkRequest` operation to check the status of the update. 17651 17652 17653 :param str vcn_id: (required) 17654 The `OCID`__ of the VCN. 17655 17656 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17657 17658 :param oci.core.models.ModifyVcnCidrDetails modify_vcn_cidr_details: (required) 17659 Details object for updating a VCN CIDR. 17660 17661 :param str opc_request_id: (optional) 17662 Unique identifier for the request. 17663 If you need to contact Oracle about a particular request, please provide the request ID. 17664 17665 :param str opc_retry_token: (optional) 17666 A token that uniquely identifies a request so it can be retried in case of a timeout or 17667 server error without risk of executing that same action again. Retry tokens expire after 24 17668 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 17669 has been deleted and purged from the system, then a retry of the original creation request 17670 may be rejected). 17671 17672 :param str if_match: (optional) 17673 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 17674 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 17675 will be updated or deleted only if the etag you provide matches the resource's current etag value. 17676 17677 :param obj retry_strategy: (optional) 17678 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 17679 17680 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. 17681 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 17682 17683 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 17684 17685 :return: A :class:`~oci.response.Response` object with data of type None 17686 :rtype: :class:`~oci.response.Response` 17687 17688 :example: 17689 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/modify_vcn_cidr.py.html>`__ to see an example of how to use modify_vcn_cidr API. 17690 """ 17691 resource_path = "/vcns/{vcnId}/actions/modifyCidr" 17692 method = "POST" 17693 17694 # Don't accept unknown kwargs 17695 expected_kwargs = [ 17696 "retry_strategy", 17697 "opc_request_id", 17698 "opc_retry_token", 17699 "if_match" 17700 ] 17701 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 17702 if extra_kwargs: 17703 raise ValueError( 17704 "modify_vcn_cidr got unknown kwargs: {!r}".format(extra_kwargs)) 17705 17706 path_params = { 17707 "vcnId": vcn_id 17708 } 17709 17710 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 17711 17712 for (k, v) in six.iteritems(path_params): 17713 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 17714 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 17715 17716 header_params = { 17717 "accept": "application/json", 17718 "content-type": "application/json", 17719 "opc-request-id": kwargs.get("opc_request_id", missing), 17720 "opc-retry-token": kwargs.get("opc_retry_token", missing), 17721 "if-match": kwargs.get("if_match", missing) 17722 } 17723 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 17724 17725 retry_strategy = self.base_client.get_preferred_retry_strategy( 17726 operation_retry_strategy=kwargs.get('retry_strategy'), 17727 client_retry_strategy=self.retry_strategy 17728 ) 17729 17730 if retry_strategy: 17731 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 17732 self.base_client.add_opc_retry_token_if_needed(header_params) 17733 self.base_client.add_opc_client_retries_header(header_params) 17734 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 17735 return retry_strategy.make_retrying_call( 17736 self.base_client.call_api, 17737 resource_path=resource_path, 17738 method=method, 17739 path_params=path_params, 17740 header_params=header_params, 17741 body=modify_vcn_cidr_details) 17742 else: 17743 return self.base_client.call_api( 17744 resource_path=resource_path, 17745 method=method, 17746 path_params=path_params, 17747 header_params=header_params, 17748 body=modify_vcn_cidr_details) 17749 17750 def remove_drg_route_distribution_statements(self, drg_route_distribution_id, remove_drg_route_distribution_statements_details, **kwargs): 17751 """ 17752 Removes one or more route distribution statements from the specified route distribution's map. 17753 17754 17755 :param str drg_route_distribution_id: (required) 17756 The `OCID`__ of the route distribution. 17757 17758 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17759 17760 :param oci.core.models.RemoveDrgRouteDistributionStatementsDetails remove_drg_route_distribution_statements_details: (required) 17761 Request with one or more route distribution statements to remove from the route distribution. 17762 17763 :param obj retry_strategy: (optional) 17764 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 17765 17766 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. 17767 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 17768 17769 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 17770 17771 :return: A :class:`~oci.response.Response` object with data of type None 17772 :rtype: :class:`~oci.response.Response` 17773 17774 :example: 17775 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/remove_drg_route_distribution_statements.py.html>`__ to see an example of how to use remove_drg_route_distribution_statements API. 17776 """ 17777 resource_path = "/drgRouteDistributions/{drgRouteDistributionId}/actions/removeDrgRouteDistributionStatements" 17778 method = "POST" 17779 17780 expected_kwargs = ["retry_strategy"] 17781 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 17782 if extra_kwargs: 17783 raise ValueError( 17784 "remove_drg_route_distribution_statements got unknown kwargs: {!r}".format(extra_kwargs)) 17785 17786 path_params = { 17787 "drgRouteDistributionId": drg_route_distribution_id 17788 } 17789 17790 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 17791 17792 for (k, v) in six.iteritems(path_params): 17793 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 17794 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 17795 17796 header_params = { 17797 "accept": "application/json", 17798 "content-type": "application/json" 17799 } 17800 17801 retry_strategy = self.base_client.get_preferred_retry_strategy( 17802 operation_retry_strategy=kwargs.get('retry_strategy'), 17803 client_retry_strategy=self.retry_strategy 17804 ) 17805 17806 if retry_strategy: 17807 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 17808 self.base_client.add_opc_client_retries_header(header_params) 17809 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 17810 return retry_strategy.make_retrying_call( 17811 self.base_client.call_api, 17812 resource_path=resource_path, 17813 method=method, 17814 path_params=path_params, 17815 header_params=header_params, 17816 body=remove_drg_route_distribution_statements_details) 17817 else: 17818 return self.base_client.call_api( 17819 resource_path=resource_path, 17820 method=method, 17821 path_params=path_params, 17822 header_params=header_params, 17823 body=remove_drg_route_distribution_statements_details) 17824 17825 def remove_drg_route_rules(self, drg_route_table_id, remove_drg_route_rules_details, **kwargs): 17826 """ 17827 Removes one or more route rules from the specified DRG route table. 17828 17829 17830 :param str drg_route_table_id: (required) 17831 The `OCID`__ of the DRG route table. 17832 17833 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17834 17835 :param oci.core.models.RemoveDrgRouteRulesDetails remove_drg_route_rules_details: (required) 17836 Request to remove one or more route rules in the DRG route table. 17837 17838 :param obj retry_strategy: (optional) 17839 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 17840 17841 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. 17842 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 17843 17844 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 17845 17846 :return: A :class:`~oci.response.Response` object with data of type None 17847 :rtype: :class:`~oci.response.Response` 17848 17849 :example: 17850 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/remove_drg_route_rules.py.html>`__ to see an example of how to use remove_drg_route_rules API. 17851 """ 17852 resource_path = "/drgRouteTables/{drgRouteTableId}/actions/removeDrgRouteRules" 17853 method = "POST" 17854 17855 expected_kwargs = ["retry_strategy"] 17856 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 17857 if extra_kwargs: 17858 raise ValueError( 17859 "remove_drg_route_rules got unknown kwargs: {!r}".format(extra_kwargs)) 17860 17861 path_params = { 17862 "drgRouteTableId": drg_route_table_id 17863 } 17864 17865 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 17866 17867 for (k, v) in six.iteritems(path_params): 17868 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 17869 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 17870 17871 header_params = { 17872 "accept": "application/json", 17873 "content-type": "application/json" 17874 } 17875 17876 retry_strategy = self.base_client.get_preferred_retry_strategy( 17877 operation_retry_strategy=kwargs.get('retry_strategy'), 17878 client_retry_strategy=self.retry_strategy 17879 ) 17880 17881 if retry_strategy: 17882 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 17883 self.base_client.add_opc_client_retries_header(header_params) 17884 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 17885 return retry_strategy.make_retrying_call( 17886 self.base_client.call_api, 17887 resource_path=resource_path, 17888 method=method, 17889 path_params=path_params, 17890 header_params=header_params, 17891 body=remove_drg_route_rules_details) 17892 else: 17893 return self.base_client.call_api( 17894 resource_path=resource_path, 17895 method=method, 17896 path_params=path_params, 17897 header_params=header_params, 17898 body=remove_drg_route_rules_details) 17899 17900 def remove_export_drg_route_distribution(self, drg_attachment_id, **kwargs): 17901 """ 17902 Removes the export route distribution from the DRG attachment so no routes are advertised to it. 17903 17904 17905 :param str drg_attachment_id: (required) 17906 The `OCID`__ of the DRG attachment. 17907 17908 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17909 17910 :param str opc_request_id: (optional) 17911 Unique identifier for the request. 17912 If you need to contact Oracle about a particular request, please provide the request ID. 17913 17914 :param str if_match: (optional) 17915 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 17916 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 17917 will be updated or deleted only if the etag you provide matches the resource's current etag value. 17918 17919 :param obj retry_strategy: (optional) 17920 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 17921 17922 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. 17923 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 17924 17925 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 17926 17927 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgAttachment` 17928 :rtype: :class:`~oci.response.Response` 17929 17930 :example: 17931 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/remove_export_drg_route_distribution.py.html>`__ to see an example of how to use remove_export_drg_route_distribution API. 17932 """ 17933 resource_path = "/drgAttachments/{drgAttachmentId}/actions/removeExportDrgRouteDistribution" 17934 method = "POST" 17935 17936 # Don't accept unknown kwargs 17937 expected_kwargs = [ 17938 "retry_strategy", 17939 "opc_request_id", 17940 "if_match" 17941 ] 17942 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 17943 if extra_kwargs: 17944 raise ValueError( 17945 "remove_export_drg_route_distribution got unknown kwargs: {!r}".format(extra_kwargs)) 17946 17947 path_params = { 17948 "drgAttachmentId": drg_attachment_id 17949 } 17950 17951 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 17952 17953 for (k, v) in six.iteritems(path_params): 17954 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 17955 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 17956 17957 header_params = { 17958 "accept": "application/json", 17959 "content-type": "application/json", 17960 "opc-request-id": kwargs.get("opc_request_id", missing), 17961 "if-match": kwargs.get("if_match", missing) 17962 } 17963 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 17964 17965 retry_strategy = self.base_client.get_preferred_retry_strategy( 17966 operation_retry_strategy=kwargs.get('retry_strategy'), 17967 client_retry_strategy=self.retry_strategy 17968 ) 17969 17970 if retry_strategy: 17971 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 17972 self.base_client.add_opc_client_retries_header(header_params) 17973 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 17974 return retry_strategy.make_retrying_call( 17975 self.base_client.call_api, 17976 resource_path=resource_path, 17977 method=method, 17978 path_params=path_params, 17979 header_params=header_params, 17980 response_type="DrgAttachment") 17981 else: 17982 return self.base_client.call_api( 17983 resource_path=resource_path, 17984 method=method, 17985 path_params=path_params, 17986 header_params=header_params, 17987 response_type="DrgAttachment") 17988 17989 def remove_import_drg_route_distribution(self, drg_route_table_id, **kwargs): 17990 """ 17991 Removes the import route distribution from the DRG route table so no routes are imported 17992 into it. 17993 17994 17995 :param str drg_route_table_id: (required) 17996 The `OCID`__ of the DRG route table. 17997 17998 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 17999 18000 :param str opc_request_id: (optional) 18001 Unique identifier for the request. 18002 If you need to contact Oracle about a particular request, please provide the request ID. 18003 18004 :param str if_match: (optional) 18005 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 18006 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 18007 will be updated or deleted only if the etag you provide matches the resource's current etag value. 18008 18009 :param obj retry_strategy: (optional) 18010 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18011 18012 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. 18013 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18014 18015 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18016 18017 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgRouteTable` 18018 :rtype: :class:`~oci.response.Response` 18019 18020 :example: 18021 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/remove_import_drg_route_distribution.py.html>`__ to see an example of how to use remove_import_drg_route_distribution API. 18022 """ 18023 resource_path = "/drgRouteTables/{drgRouteTableId}/actions/removeImportDrgRouteDistribution" 18024 method = "POST" 18025 18026 # Don't accept unknown kwargs 18027 expected_kwargs = [ 18028 "retry_strategy", 18029 "opc_request_id", 18030 "if_match" 18031 ] 18032 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18033 if extra_kwargs: 18034 raise ValueError( 18035 "remove_import_drg_route_distribution got unknown kwargs: {!r}".format(extra_kwargs)) 18036 18037 path_params = { 18038 "drgRouteTableId": drg_route_table_id 18039 } 18040 18041 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18042 18043 for (k, v) in six.iteritems(path_params): 18044 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18045 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18046 18047 header_params = { 18048 "accept": "application/json", 18049 "content-type": "application/json", 18050 "opc-request-id": kwargs.get("opc_request_id", missing), 18051 "if-match": kwargs.get("if_match", missing) 18052 } 18053 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18054 18055 retry_strategy = self.base_client.get_preferred_retry_strategy( 18056 operation_retry_strategy=kwargs.get('retry_strategy'), 18057 client_retry_strategy=self.retry_strategy 18058 ) 18059 18060 if retry_strategy: 18061 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18062 self.base_client.add_opc_client_retries_header(header_params) 18063 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18064 return retry_strategy.make_retrying_call( 18065 self.base_client.call_api, 18066 resource_path=resource_path, 18067 method=method, 18068 path_params=path_params, 18069 header_params=header_params, 18070 response_type="DrgRouteTable") 18071 else: 18072 return self.base_client.call_api( 18073 resource_path=resource_path, 18074 method=method, 18075 path_params=path_params, 18076 header_params=header_params, 18077 response_type="DrgRouteTable") 18078 18079 def remove_network_security_group_security_rules(self, network_security_group_id, remove_network_security_group_security_rules_details, **kwargs): 18080 """ 18081 Removes one or more security rules from the specified network security group. 18082 18083 18084 :param str network_security_group_id: (required) 18085 The `OCID`__ of the network security group. 18086 18087 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 18088 18089 :param oci.core.models.RemoveNetworkSecurityGroupSecurityRulesDetails remove_network_security_group_security_rules_details: (required) 18090 Request with one or more security rules associated with the network security group that 18091 will be removed. 18092 18093 :param obj retry_strategy: (optional) 18094 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18095 18096 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. 18097 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18098 18099 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18100 18101 :return: A :class:`~oci.response.Response` object with data of type None 18102 :rtype: :class:`~oci.response.Response` 18103 18104 :example: 18105 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/remove_network_security_group_security_rules.py.html>`__ to see an example of how to use remove_network_security_group_security_rules API. 18106 """ 18107 resource_path = "/networkSecurityGroups/{networkSecurityGroupId}/actions/removeSecurityRules" 18108 method = "POST" 18109 18110 expected_kwargs = ["retry_strategy"] 18111 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18112 if extra_kwargs: 18113 raise ValueError( 18114 "remove_network_security_group_security_rules got unknown kwargs: {!r}".format(extra_kwargs)) 18115 18116 path_params = { 18117 "networkSecurityGroupId": network_security_group_id 18118 } 18119 18120 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18121 18122 for (k, v) in six.iteritems(path_params): 18123 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18124 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18125 18126 header_params = { 18127 "accept": "application/json", 18128 "content-type": "application/json" 18129 } 18130 18131 retry_strategy = self.base_client.get_preferred_retry_strategy( 18132 operation_retry_strategy=kwargs.get('retry_strategy'), 18133 client_retry_strategy=self.retry_strategy 18134 ) 18135 18136 if retry_strategy: 18137 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18138 self.base_client.add_opc_client_retries_header(header_params) 18139 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18140 return retry_strategy.make_retrying_call( 18141 self.base_client.call_api, 18142 resource_path=resource_path, 18143 method=method, 18144 path_params=path_params, 18145 header_params=header_params, 18146 body=remove_network_security_group_security_rules_details) 18147 else: 18148 return self.base_client.call_api( 18149 resource_path=resource_path, 18150 method=method, 18151 path_params=path_params, 18152 header_params=header_params, 18153 body=remove_network_security_group_security_rules_details) 18154 18155 def remove_public_ip_pool_capacity(self, public_ip_pool_id, remove_public_ip_pool_capacity_details, **kwargs): 18156 """ 18157 Removes a CIDR block from the referenced public IP pool. 18158 18159 18160 :param str public_ip_pool_id: (required) 18161 The `OCID`__ of the public IP pool. 18162 18163 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 18164 18165 :param oci.core.models.RemovePublicIpPoolCapacityDetails remove_public_ip_pool_capacity_details: (required) 18166 The CIDR block to remove from the IP pool. 18167 18168 :param str opc_request_id: (optional) 18169 Unique identifier for the request. 18170 If you need to contact Oracle about a particular request, please provide the request ID. 18171 18172 :param str opc_retry_token: (optional) 18173 A token that uniquely identifies a request so it can be retried in case of a timeout or 18174 server error without risk of executing that same action again. Retry tokens expire after 24 18175 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 18176 has been deleted and purged from the system, then a retry of the original creation request 18177 may be rejected). 18178 18179 :param obj retry_strategy: (optional) 18180 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18181 18182 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. 18183 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18184 18185 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18186 18187 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` 18188 :rtype: :class:`~oci.response.Response` 18189 18190 :example: 18191 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/remove_public_ip_pool_capacity.py.html>`__ to see an example of how to use remove_public_ip_pool_capacity API. 18192 """ 18193 resource_path = "/publicIpPools/{publicIpPoolId}/actions/removeCapacity" 18194 method = "POST" 18195 18196 # Don't accept unknown kwargs 18197 expected_kwargs = [ 18198 "retry_strategy", 18199 "opc_request_id", 18200 "opc_retry_token" 18201 ] 18202 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18203 if extra_kwargs: 18204 raise ValueError( 18205 "remove_public_ip_pool_capacity got unknown kwargs: {!r}".format(extra_kwargs)) 18206 18207 path_params = { 18208 "publicIpPoolId": public_ip_pool_id 18209 } 18210 18211 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18212 18213 for (k, v) in six.iteritems(path_params): 18214 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18215 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18216 18217 header_params = { 18218 "accept": "application/json", 18219 "content-type": "application/json", 18220 "opc-request-id": kwargs.get("opc_request_id", missing), 18221 "opc-retry-token": kwargs.get("opc_retry_token", missing) 18222 } 18223 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18224 18225 retry_strategy = self.base_client.get_preferred_retry_strategy( 18226 operation_retry_strategy=kwargs.get('retry_strategy'), 18227 client_retry_strategy=self.retry_strategy 18228 ) 18229 18230 if retry_strategy: 18231 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18232 self.base_client.add_opc_retry_token_if_needed(header_params) 18233 self.base_client.add_opc_client_retries_header(header_params) 18234 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18235 return retry_strategy.make_retrying_call( 18236 self.base_client.call_api, 18237 resource_path=resource_path, 18238 method=method, 18239 path_params=path_params, 18240 header_params=header_params, 18241 body=remove_public_ip_pool_capacity_details, 18242 response_type="PublicIpPool") 18243 else: 18244 return self.base_client.call_api( 18245 resource_path=resource_path, 18246 method=method, 18247 path_params=path_params, 18248 header_params=header_params, 18249 body=remove_public_ip_pool_capacity_details, 18250 response_type="PublicIpPool") 18251 18252 def remove_vcn_cidr(self, vcn_id, remove_vcn_cidr_details, **kwargs): 18253 """ 18254 Removes a specified CIDR block from a VCN. 18255 18256 **Notes:** 18257 - You cannot remove a CIDR block if an IP address in its range is in use. 18258 - Removing a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can take a few minutes. You can use the `GetWorkRequest` operation to check the status of the update. 18259 18260 18261 :param str vcn_id: (required) 18262 The `OCID`__ of the VCN. 18263 18264 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 18265 18266 :param oci.core.models.RemoveVcnCidrDetails remove_vcn_cidr_details: (required) 18267 Details object for removing a VCN CIDR. 18268 18269 :param str opc_request_id: (optional) 18270 Unique identifier for the request. 18271 If you need to contact Oracle about a particular request, please provide the request ID. 18272 18273 :param str opc_retry_token: (optional) 18274 A token that uniquely identifies a request so it can be retried in case of a timeout or 18275 server error without risk of executing that same action again. Retry tokens expire after 24 18276 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 18277 has been deleted and purged from the system, then a retry of the original creation request 18278 may be rejected). 18279 18280 :param str if_match: (optional) 18281 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 18282 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 18283 will be updated or deleted only if the etag you provide matches the resource's current etag value. 18284 18285 :param obj retry_strategy: (optional) 18286 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18287 18288 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. 18289 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18290 18291 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18292 18293 :return: A :class:`~oci.response.Response` object with data of type None 18294 :rtype: :class:`~oci.response.Response` 18295 18296 :example: 18297 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/remove_vcn_cidr.py.html>`__ to see an example of how to use remove_vcn_cidr API. 18298 """ 18299 resource_path = "/vcns/{vcnId}/actions/removeCidr" 18300 method = "POST" 18301 18302 # Don't accept unknown kwargs 18303 expected_kwargs = [ 18304 "retry_strategy", 18305 "opc_request_id", 18306 "opc_retry_token", 18307 "if_match" 18308 ] 18309 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18310 if extra_kwargs: 18311 raise ValueError( 18312 "remove_vcn_cidr got unknown kwargs: {!r}".format(extra_kwargs)) 18313 18314 path_params = { 18315 "vcnId": vcn_id 18316 } 18317 18318 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18319 18320 for (k, v) in six.iteritems(path_params): 18321 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18322 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18323 18324 header_params = { 18325 "accept": "application/json", 18326 "content-type": "application/json", 18327 "opc-request-id": kwargs.get("opc_request_id", missing), 18328 "opc-retry-token": kwargs.get("opc_retry_token", missing), 18329 "if-match": kwargs.get("if_match", missing) 18330 } 18331 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18332 18333 retry_strategy = self.base_client.get_preferred_retry_strategy( 18334 operation_retry_strategy=kwargs.get('retry_strategy'), 18335 client_retry_strategy=self.retry_strategy 18336 ) 18337 18338 if retry_strategy: 18339 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18340 self.base_client.add_opc_retry_token_if_needed(header_params) 18341 self.base_client.add_opc_client_retries_header(header_params) 18342 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18343 return retry_strategy.make_retrying_call( 18344 self.base_client.call_api, 18345 resource_path=resource_path, 18346 method=method, 18347 path_params=path_params, 18348 header_params=header_params, 18349 body=remove_vcn_cidr_details) 18350 else: 18351 return self.base_client.call_api( 18352 resource_path=resource_path, 18353 method=method, 18354 path_params=path_params, 18355 header_params=header_params, 18356 body=remove_vcn_cidr_details) 18357 18358 def update_byoip_range(self, byoip_range_id, update_byoip_range_details, **kwargs): 18359 """ 18360 Updates the tags or display name associated to the specified BYOIP CIDR block. 18361 18362 18363 :param str byoip_range_id: (required) 18364 The `OCID`__ of the `ByoipRange` resource containing the BYOIP CIDR block. 18365 18366 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 18367 18368 :param oci.core.models.UpdateByoipRangeDetails update_byoip_range_details: (required) 18369 Byoip Range details. 18370 18371 :param str opc_request_id: (optional) 18372 Unique identifier for the request. 18373 If you need to contact Oracle about a particular request, please provide the request ID. 18374 18375 :param str if_match: (optional) 18376 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 18377 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 18378 will be updated or deleted only if the etag you provide matches the resource's current etag value. 18379 18380 :param obj retry_strategy: (optional) 18381 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18382 18383 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. 18384 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18385 18386 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18387 18388 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipRange` 18389 :rtype: :class:`~oci.response.Response` 18390 18391 :example: 18392 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_byoip_range.py.html>`__ to see an example of how to use update_byoip_range API. 18393 """ 18394 resource_path = "/byoipRanges/{byoipRangeId}" 18395 method = "PUT" 18396 18397 # Don't accept unknown kwargs 18398 expected_kwargs = [ 18399 "retry_strategy", 18400 "opc_request_id", 18401 "if_match" 18402 ] 18403 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18404 if extra_kwargs: 18405 raise ValueError( 18406 "update_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) 18407 18408 path_params = { 18409 "byoipRangeId": byoip_range_id 18410 } 18411 18412 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18413 18414 for (k, v) in six.iteritems(path_params): 18415 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18416 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18417 18418 header_params = { 18419 "accept": "application/json", 18420 "content-type": "application/json", 18421 "opc-request-id": kwargs.get("opc_request_id", missing), 18422 "if-match": kwargs.get("if_match", missing) 18423 } 18424 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18425 18426 retry_strategy = self.base_client.get_preferred_retry_strategy( 18427 operation_retry_strategy=kwargs.get('retry_strategy'), 18428 client_retry_strategy=self.retry_strategy 18429 ) 18430 18431 if retry_strategy: 18432 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18433 self.base_client.add_opc_client_retries_header(header_params) 18434 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18435 return retry_strategy.make_retrying_call( 18436 self.base_client.call_api, 18437 resource_path=resource_path, 18438 method=method, 18439 path_params=path_params, 18440 header_params=header_params, 18441 body=update_byoip_range_details, 18442 response_type="ByoipRange") 18443 else: 18444 return self.base_client.call_api( 18445 resource_path=resource_path, 18446 method=method, 18447 path_params=path_params, 18448 header_params=header_params, 18449 body=update_byoip_range_details, 18450 response_type="ByoipRange") 18451 18452 def update_cpe(self, cpe_id, update_cpe_details, **kwargs): 18453 """ 18454 Updates the specified CPE's display name or tags. 18455 Avoid entering confidential information. 18456 18457 18458 :param str cpe_id: (required) 18459 The `OCID`__ of the CPE. 18460 18461 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 18462 18463 :param oci.core.models.UpdateCpeDetails update_cpe_details: (required) 18464 Details object for updating a CPE. 18465 18466 :param str if_match: (optional) 18467 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 18468 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 18469 will be updated or deleted only if the etag you provide matches the resource's current etag value. 18470 18471 :param obj retry_strategy: (optional) 18472 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18473 18474 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. 18475 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18476 18477 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18478 18479 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Cpe` 18480 :rtype: :class:`~oci.response.Response` 18481 18482 :example: 18483 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_cpe.py.html>`__ to see an example of how to use update_cpe API. 18484 """ 18485 resource_path = "/cpes/{cpeId}" 18486 method = "PUT" 18487 18488 # Don't accept unknown kwargs 18489 expected_kwargs = [ 18490 "retry_strategy", 18491 "if_match" 18492 ] 18493 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18494 if extra_kwargs: 18495 raise ValueError( 18496 "update_cpe got unknown kwargs: {!r}".format(extra_kwargs)) 18497 18498 path_params = { 18499 "cpeId": cpe_id 18500 } 18501 18502 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18503 18504 for (k, v) in six.iteritems(path_params): 18505 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18506 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18507 18508 header_params = { 18509 "accept": "application/json", 18510 "content-type": "application/json", 18511 "if-match": kwargs.get("if_match", missing) 18512 } 18513 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18514 18515 retry_strategy = self.base_client.get_preferred_retry_strategy( 18516 operation_retry_strategy=kwargs.get('retry_strategy'), 18517 client_retry_strategy=self.retry_strategy 18518 ) 18519 18520 if retry_strategy: 18521 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18522 self.base_client.add_opc_client_retries_header(header_params) 18523 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18524 return retry_strategy.make_retrying_call( 18525 self.base_client.call_api, 18526 resource_path=resource_path, 18527 method=method, 18528 path_params=path_params, 18529 header_params=header_params, 18530 body=update_cpe_details, 18531 response_type="Cpe") 18532 else: 18533 return self.base_client.call_api( 18534 resource_path=resource_path, 18535 method=method, 18536 path_params=path_params, 18537 header_params=header_params, 18538 body=update_cpe_details, 18539 response_type="Cpe") 18540 18541 def update_cross_connect(self, cross_connect_id, update_cross_connect_details, **kwargs): 18542 """ 18543 Updates the specified cross-connect. 18544 18545 18546 :param str cross_connect_id: (required) 18547 The `OCID`__ of the cross-connect. 18548 18549 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 18550 18551 :param oci.core.models.UpdateCrossConnectDetails update_cross_connect_details: (required) 18552 Update CrossConnect fields. 18553 18554 :param str if_match: (optional) 18555 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 18556 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 18557 will be updated or deleted only if the etag you provide matches the resource's current etag value. 18558 18559 :param obj retry_strategy: (optional) 18560 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18561 18562 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. 18563 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18564 18565 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18566 18567 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.CrossConnect` 18568 :rtype: :class:`~oci.response.Response` 18569 18570 :example: 18571 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_cross_connect.py.html>`__ to see an example of how to use update_cross_connect API. 18572 """ 18573 resource_path = "/crossConnects/{crossConnectId}" 18574 method = "PUT" 18575 18576 # Don't accept unknown kwargs 18577 expected_kwargs = [ 18578 "retry_strategy", 18579 "if_match" 18580 ] 18581 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18582 if extra_kwargs: 18583 raise ValueError( 18584 "update_cross_connect got unknown kwargs: {!r}".format(extra_kwargs)) 18585 18586 path_params = { 18587 "crossConnectId": cross_connect_id 18588 } 18589 18590 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18591 18592 for (k, v) in six.iteritems(path_params): 18593 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18594 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18595 18596 header_params = { 18597 "accept": "application/json", 18598 "content-type": "application/json", 18599 "if-match": kwargs.get("if_match", missing) 18600 } 18601 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18602 18603 retry_strategy = self.base_client.get_preferred_retry_strategy( 18604 operation_retry_strategy=kwargs.get('retry_strategy'), 18605 client_retry_strategy=self.retry_strategy 18606 ) 18607 18608 if retry_strategy: 18609 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18610 self.base_client.add_opc_client_retries_header(header_params) 18611 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18612 return retry_strategy.make_retrying_call( 18613 self.base_client.call_api, 18614 resource_path=resource_path, 18615 method=method, 18616 path_params=path_params, 18617 header_params=header_params, 18618 body=update_cross_connect_details, 18619 response_type="CrossConnect") 18620 else: 18621 return self.base_client.call_api( 18622 resource_path=resource_path, 18623 method=method, 18624 path_params=path_params, 18625 header_params=header_params, 18626 body=update_cross_connect_details, 18627 response_type="CrossConnect") 18628 18629 def update_cross_connect_group(self, cross_connect_group_id, update_cross_connect_group_details, **kwargs): 18630 """ 18631 Updates the specified cross-connect group's display name. 18632 Avoid entering confidential information. 18633 18634 18635 :param str cross_connect_group_id: (required) 18636 The `OCID`__ of the cross-connect group. 18637 18638 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 18639 18640 :param oci.core.models.UpdateCrossConnectGroupDetails update_cross_connect_group_details: (required) 18641 Update CrossConnectGroup fields 18642 18643 :param str if_match: (optional) 18644 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 18645 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 18646 will be updated or deleted only if the etag you provide matches the resource's current etag value. 18647 18648 :param obj retry_strategy: (optional) 18649 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18650 18651 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. 18652 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18653 18654 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18655 18656 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.CrossConnectGroup` 18657 :rtype: :class:`~oci.response.Response` 18658 18659 :example: 18660 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_cross_connect_group.py.html>`__ to see an example of how to use update_cross_connect_group API. 18661 """ 18662 resource_path = "/crossConnectGroups/{crossConnectGroupId}" 18663 method = "PUT" 18664 18665 # Don't accept unknown kwargs 18666 expected_kwargs = [ 18667 "retry_strategy", 18668 "if_match" 18669 ] 18670 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18671 if extra_kwargs: 18672 raise ValueError( 18673 "update_cross_connect_group got unknown kwargs: {!r}".format(extra_kwargs)) 18674 18675 path_params = { 18676 "crossConnectGroupId": cross_connect_group_id 18677 } 18678 18679 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18680 18681 for (k, v) in six.iteritems(path_params): 18682 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18683 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18684 18685 header_params = { 18686 "accept": "application/json", 18687 "content-type": "application/json", 18688 "if-match": kwargs.get("if_match", missing) 18689 } 18690 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18691 18692 retry_strategy = self.base_client.get_preferred_retry_strategy( 18693 operation_retry_strategy=kwargs.get('retry_strategy'), 18694 client_retry_strategy=self.retry_strategy 18695 ) 18696 18697 if retry_strategy: 18698 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18699 self.base_client.add_opc_client_retries_header(header_params) 18700 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18701 return retry_strategy.make_retrying_call( 18702 self.base_client.call_api, 18703 resource_path=resource_path, 18704 method=method, 18705 path_params=path_params, 18706 header_params=header_params, 18707 body=update_cross_connect_group_details, 18708 response_type="CrossConnectGroup") 18709 else: 18710 return self.base_client.call_api( 18711 resource_path=resource_path, 18712 method=method, 18713 path_params=path_params, 18714 header_params=header_params, 18715 body=update_cross_connect_group_details, 18716 response_type="CrossConnectGroup") 18717 18718 def update_dhcp_options(self, dhcp_id, update_dhcp_details, **kwargs): 18719 """ 18720 Updates the specified set of DHCP options. You can update the display name or the options 18721 themselves. Avoid entering confidential information. 18722 18723 Note that the `options` object you provide replaces the entire existing set of options. 18724 18725 18726 :param str dhcp_id: (required) 18727 The `OCID`__ for the set of DHCP options. 18728 18729 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 18730 18731 :param oci.core.models.UpdateDhcpDetails update_dhcp_details: (required) 18732 Request object for updating a set of DHCP options. 18733 18734 :param str if_match: (optional) 18735 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 18736 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 18737 will be updated or deleted only if the etag you provide matches the resource's current etag value. 18738 18739 :param obj retry_strategy: (optional) 18740 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18741 18742 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. 18743 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18744 18745 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18746 18747 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DhcpOptions` 18748 :rtype: :class:`~oci.response.Response` 18749 18750 :example: 18751 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_dhcp_options.py.html>`__ to see an example of how to use update_dhcp_options API. 18752 """ 18753 resource_path = "/dhcps/{dhcpId}" 18754 method = "PUT" 18755 18756 # Don't accept unknown kwargs 18757 expected_kwargs = [ 18758 "retry_strategy", 18759 "if_match" 18760 ] 18761 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18762 if extra_kwargs: 18763 raise ValueError( 18764 "update_dhcp_options got unknown kwargs: {!r}".format(extra_kwargs)) 18765 18766 path_params = { 18767 "dhcpId": dhcp_id 18768 } 18769 18770 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18771 18772 for (k, v) in six.iteritems(path_params): 18773 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18774 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18775 18776 header_params = { 18777 "accept": "application/json", 18778 "content-type": "application/json", 18779 "if-match": kwargs.get("if_match", missing) 18780 } 18781 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18782 18783 retry_strategy = self.base_client.get_preferred_retry_strategy( 18784 operation_retry_strategy=kwargs.get('retry_strategy'), 18785 client_retry_strategy=self.retry_strategy 18786 ) 18787 18788 if retry_strategy: 18789 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18790 self.base_client.add_opc_client_retries_header(header_params) 18791 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18792 return retry_strategy.make_retrying_call( 18793 self.base_client.call_api, 18794 resource_path=resource_path, 18795 method=method, 18796 path_params=path_params, 18797 header_params=header_params, 18798 body=update_dhcp_details, 18799 response_type="DhcpOptions") 18800 else: 18801 return self.base_client.call_api( 18802 resource_path=resource_path, 18803 method=method, 18804 path_params=path_params, 18805 header_params=header_params, 18806 body=update_dhcp_details, 18807 response_type="DhcpOptions") 18808 18809 def update_drg(self, drg_id, update_drg_details, **kwargs): 18810 """ 18811 Updates the specified DRG's display name or tags. Avoid entering confidential information. 18812 18813 18814 :param str drg_id: (required) 18815 The `OCID`__ of the DRG. 18816 18817 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 18818 18819 :param oci.core.models.UpdateDrgDetails update_drg_details: (required) 18820 Details object for updating a DRG. 18821 18822 :param str if_match: (optional) 18823 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 18824 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 18825 will be updated or deleted only if the etag you provide matches the resource's current etag value. 18826 18827 :param obj retry_strategy: (optional) 18828 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18829 18830 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. 18831 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18832 18833 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18834 18835 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Drg` 18836 :rtype: :class:`~oci.response.Response` 18837 18838 :example: 18839 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_drg.py.html>`__ to see an example of how to use update_drg API. 18840 """ 18841 resource_path = "/drgs/{drgId}" 18842 method = "PUT" 18843 18844 # Don't accept unknown kwargs 18845 expected_kwargs = [ 18846 "retry_strategy", 18847 "if_match" 18848 ] 18849 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18850 if extra_kwargs: 18851 raise ValueError( 18852 "update_drg got unknown kwargs: {!r}".format(extra_kwargs)) 18853 18854 path_params = { 18855 "drgId": drg_id 18856 } 18857 18858 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18859 18860 for (k, v) in six.iteritems(path_params): 18861 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18862 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18863 18864 header_params = { 18865 "accept": "application/json", 18866 "content-type": "application/json", 18867 "if-match": kwargs.get("if_match", missing) 18868 } 18869 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18870 18871 retry_strategy = self.base_client.get_preferred_retry_strategy( 18872 operation_retry_strategy=kwargs.get('retry_strategy'), 18873 client_retry_strategy=self.retry_strategy 18874 ) 18875 18876 if retry_strategy: 18877 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18878 self.base_client.add_opc_client_retries_header(header_params) 18879 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18880 return retry_strategy.make_retrying_call( 18881 self.base_client.call_api, 18882 resource_path=resource_path, 18883 method=method, 18884 path_params=path_params, 18885 header_params=header_params, 18886 body=update_drg_details, 18887 response_type="Drg") 18888 else: 18889 return self.base_client.call_api( 18890 resource_path=resource_path, 18891 method=method, 18892 path_params=path_params, 18893 header_params=header_params, 18894 body=update_drg_details, 18895 response_type="Drg") 18896 18897 def update_drg_attachment(self, drg_attachment_id, update_drg_attachment_details, **kwargs): 18898 """ 18899 Updates the display name and routing information for the specified `DrgAttachment`. 18900 Avoid entering confidential information. 18901 18902 18903 :param str drg_attachment_id: (required) 18904 The `OCID`__ of the DRG attachment. 18905 18906 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 18907 18908 :param oci.core.models.UpdateDrgAttachmentDetails update_drg_attachment_details: (required) 18909 Details object for updating a `DrgAttachment`. 18910 18911 :param str if_match: (optional) 18912 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 18913 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 18914 will be updated or deleted only if the etag you provide matches the resource's current etag value. 18915 18916 :param obj retry_strategy: (optional) 18917 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 18918 18919 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. 18920 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 18921 18922 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 18923 18924 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgAttachment` 18925 :rtype: :class:`~oci.response.Response` 18926 18927 :example: 18928 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_drg_attachment.py.html>`__ to see an example of how to use update_drg_attachment API. 18929 """ 18930 resource_path = "/drgAttachments/{drgAttachmentId}" 18931 method = "PUT" 18932 18933 # Don't accept unknown kwargs 18934 expected_kwargs = [ 18935 "retry_strategy", 18936 "if_match" 18937 ] 18938 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 18939 if extra_kwargs: 18940 raise ValueError( 18941 "update_drg_attachment got unknown kwargs: {!r}".format(extra_kwargs)) 18942 18943 path_params = { 18944 "drgAttachmentId": drg_attachment_id 18945 } 18946 18947 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 18948 18949 for (k, v) in six.iteritems(path_params): 18950 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 18951 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 18952 18953 header_params = { 18954 "accept": "application/json", 18955 "content-type": "application/json", 18956 "if-match": kwargs.get("if_match", missing) 18957 } 18958 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 18959 18960 retry_strategy = self.base_client.get_preferred_retry_strategy( 18961 operation_retry_strategy=kwargs.get('retry_strategy'), 18962 client_retry_strategy=self.retry_strategy 18963 ) 18964 18965 if retry_strategy: 18966 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 18967 self.base_client.add_opc_client_retries_header(header_params) 18968 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 18969 return retry_strategy.make_retrying_call( 18970 self.base_client.call_api, 18971 resource_path=resource_path, 18972 method=method, 18973 path_params=path_params, 18974 header_params=header_params, 18975 body=update_drg_attachment_details, 18976 response_type="DrgAttachment") 18977 else: 18978 return self.base_client.call_api( 18979 resource_path=resource_path, 18980 method=method, 18981 path_params=path_params, 18982 header_params=header_params, 18983 body=update_drg_attachment_details, 18984 response_type="DrgAttachment") 18985 18986 def update_drg_route_distribution(self, drg_route_distribution_id, update_drg_route_distribution_details, **kwargs): 18987 """ 18988 Updates the specified route distribution 18989 18990 18991 :param str drg_route_distribution_id: (required) 18992 The `OCID`__ of the route distribution. 18993 18994 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 18995 18996 :param oci.core.models.UpdateDrgRouteDistributionDetails update_drg_route_distribution_details: (required) 18997 Details object for updating a route distribution 18998 18999 :param str if_match: (optional) 19000 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 19001 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 19002 will be updated or deleted only if the etag you provide matches the resource's current etag value. 19003 19004 :param obj retry_strategy: (optional) 19005 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19006 19007 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. 19008 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19009 19010 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19011 19012 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgRouteDistribution` 19013 :rtype: :class:`~oci.response.Response` 19014 19015 :example: 19016 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_drg_route_distribution.py.html>`__ to see an example of how to use update_drg_route_distribution API. 19017 """ 19018 resource_path = "/drgRouteDistributions/{drgRouteDistributionId}" 19019 method = "PUT" 19020 19021 # Don't accept unknown kwargs 19022 expected_kwargs = [ 19023 "retry_strategy", 19024 "if_match" 19025 ] 19026 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19027 if extra_kwargs: 19028 raise ValueError( 19029 "update_drg_route_distribution got unknown kwargs: {!r}".format(extra_kwargs)) 19030 19031 path_params = { 19032 "drgRouteDistributionId": drg_route_distribution_id 19033 } 19034 19035 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19036 19037 for (k, v) in six.iteritems(path_params): 19038 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19039 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19040 19041 header_params = { 19042 "accept": "application/json", 19043 "content-type": "application/json", 19044 "if-match": kwargs.get("if_match", missing) 19045 } 19046 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 19047 19048 retry_strategy = self.base_client.get_preferred_retry_strategy( 19049 operation_retry_strategy=kwargs.get('retry_strategy'), 19050 client_retry_strategy=self.retry_strategy 19051 ) 19052 19053 if retry_strategy: 19054 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19055 self.base_client.add_opc_client_retries_header(header_params) 19056 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19057 return retry_strategy.make_retrying_call( 19058 self.base_client.call_api, 19059 resource_path=resource_path, 19060 method=method, 19061 path_params=path_params, 19062 header_params=header_params, 19063 body=update_drg_route_distribution_details, 19064 response_type="DrgRouteDistribution") 19065 else: 19066 return self.base_client.call_api( 19067 resource_path=resource_path, 19068 method=method, 19069 path_params=path_params, 19070 header_params=header_params, 19071 body=update_drg_route_distribution_details, 19072 response_type="DrgRouteDistribution") 19073 19074 def update_drg_route_distribution_statements(self, drg_route_distribution_id, update_drg_route_distribution_statements_details, **kwargs): 19075 """ 19076 Updates one or more route distribution statements in the specified route distribution. 19077 19078 19079 :param str drg_route_distribution_id: (required) 19080 The `OCID`__ of the route distribution. 19081 19082 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 19083 19084 :param oci.core.models.UpdateDrgRouteDistributionStatementsDetails update_drg_route_distribution_statements_details: (required) 19085 Request to update one or more route distribution statements in the route distribution. 19086 19087 :param obj retry_strategy: (optional) 19088 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19089 19090 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. 19091 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19092 19093 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19094 19095 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgRouteDistributionStatement` 19096 :rtype: :class:`~oci.response.Response` 19097 19098 :example: 19099 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_drg_route_distribution_statements.py.html>`__ to see an example of how to use update_drg_route_distribution_statements API. 19100 """ 19101 resource_path = "/drgRouteDistributions/{drgRouteDistributionId}/actions/updateDrgRouteDistributionStatements" 19102 method = "POST" 19103 19104 expected_kwargs = ["retry_strategy"] 19105 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19106 if extra_kwargs: 19107 raise ValueError( 19108 "update_drg_route_distribution_statements got unknown kwargs: {!r}".format(extra_kwargs)) 19109 19110 path_params = { 19111 "drgRouteDistributionId": drg_route_distribution_id 19112 } 19113 19114 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19115 19116 for (k, v) in six.iteritems(path_params): 19117 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19118 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19119 19120 header_params = { 19121 "accept": "application/json", 19122 "content-type": "application/json" 19123 } 19124 19125 retry_strategy = self.base_client.get_preferred_retry_strategy( 19126 operation_retry_strategy=kwargs.get('retry_strategy'), 19127 client_retry_strategy=self.retry_strategy 19128 ) 19129 19130 if retry_strategy: 19131 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19132 self.base_client.add_opc_client_retries_header(header_params) 19133 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19134 return retry_strategy.make_retrying_call( 19135 self.base_client.call_api, 19136 resource_path=resource_path, 19137 method=method, 19138 path_params=path_params, 19139 header_params=header_params, 19140 body=update_drg_route_distribution_statements_details, 19141 response_type="list[DrgRouteDistributionStatement]") 19142 else: 19143 return self.base_client.call_api( 19144 resource_path=resource_path, 19145 method=method, 19146 path_params=path_params, 19147 header_params=header_params, 19148 body=update_drg_route_distribution_statements_details, 19149 response_type="list[DrgRouteDistributionStatement]") 19150 19151 def update_drg_route_rules(self, drg_route_table_id, update_drg_route_rules_details, **kwargs): 19152 """ 19153 Updates one or more route rules in the specified DRG route table. 19154 19155 19156 :param str drg_route_table_id: (required) 19157 The `OCID`__ of the DRG route table. 19158 19159 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 19160 19161 :param oci.core.models.UpdateDrgRouteRulesDetails update_drg_route_rules_details: (required) 19162 Request to update one or more route rules in the DRG route table. 19163 19164 :param obj retry_strategy: (optional) 19165 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19166 19167 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. 19168 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19169 19170 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19171 19172 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DrgRouteRule` 19173 :rtype: :class:`~oci.response.Response` 19174 19175 :example: 19176 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_drg_route_rules.py.html>`__ to see an example of how to use update_drg_route_rules API. 19177 """ 19178 resource_path = "/drgRouteTables/{drgRouteTableId}/actions/updateDrgRouteRules" 19179 method = "POST" 19180 19181 expected_kwargs = ["retry_strategy"] 19182 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19183 if extra_kwargs: 19184 raise ValueError( 19185 "update_drg_route_rules got unknown kwargs: {!r}".format(extra_kwargs)) 19186 19187 path_params = { 19188 "drgRouteTableId": drg_route_table_id 19189 } 19190 19191 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19192 19193 for (k, v) in six.iteritems(path_params): 19194 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19195 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19196 19197 header_params = { 19198 "accept": "application/json", 19199 "content-type": "application/json" 19200 } 19201 19202 retry_strategy = self.base_client.get_preferred_retry_strategy( 19203 operation_retry_strategy=kwargs.get('retry_strategy'), 19204 client_retry_strategy=self.retry_strategy 19205 ) 19206 19207 if retry_strategy: 19208 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19209 self.base_client.add_opc_client_retries_header(header_params) 19210 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19211 return retry_strategy.make_retrying_call( 19212 self.base_client.call_api, 19213 resource_path=resource_path, 19214 method=method, 19215 path_params=path_params, 19216 header_params=header_params, 19217 body=update_drg_route_rules_details, 19218 response_type="list[DrgRouteRule]") 19219 else: 19220 return self.base_client.call_api( 19221 resource_path=resource_path, 19222 method=method, 19223 path_params=path_params, 19224 header_params=header_params, 19225 body=update_drg_route_rules_details, 19226 response_type="list[DrgRouteRule]") 19227 19228 def update_drg_route_table(self, drg_route_table_id, update_drg_route_table_details, **kwargs): 19229 """ 19230 Updates the specified DRG route table. 19231 19232 19233 :param str drg_route_table_id: (required) 19234 The `OCID`__ of the DRG route table. 19235 19236 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 19237 19238 :param oci.core.models.UpdateDrgRouteTableDetails update_drg_route_table_details: (required) 19239 Details object used to updating a DRG route table. 19240 19241 :param str if_match: (optional) 19242 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 19243 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 19244 will be updated or deleted only if the etag you provide matches the resource's current etag value. 19245 19246 :param obj retry_strategy: (optional) 19247 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19248 19249 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. 19250 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19251 19252 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19253 19254 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DrgRouteTable` 19255 :rtype: :class:`~oci.response.Response` 19256 19257 :example: 19258 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_drg_route_table.py.html>`__ to see an example of how to use update_drg_route_table API. 19259 """ 19260 resource_path = "/drgRouteTables/{drgRouteTableId}" 19261 method = "PUT" 19262 19263 # Don't accept unknown kwargs 19264 expected_kwargs = [ 19265 "retry_strategy", 19266 "if_match" 19267 ] 19268 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19269 if extra_kwargs: 19270 raise ValueError( 19271 "update_drg_route_table got unknown kwargs: {!r}".format(extra_kwargs)) 19272 19273 path_params = { 19274 "drgRouteTableId": drg_route_table_id 19275 } 19276 19277 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19278 19279 for (k, v) in six.iteritems(path_params): 19280 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19281 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19282 19283 header_params = { 19284 "accept": "application/json", 19285 "content-type": "application/json", 19286 "if-match": kwargs.get("if_match", missing) 19287 } 19288 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 19289 19290 retry_strategy = self.base_client.get_preferred_retry_strategy( 19291 operation_retry_strategy=kwargs.get('retry_strategy'), 19292 client_retry_strategy=self.retry_strategy 19293 ) 19294 19295 if retry_strategy: 19296 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19297 self.base_client.add_opc_client_retries_header(header_params) 19298 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19299 return retry_strategy.make_retrying_call( 19300 self.base_client.call_api, 19301 resource_path=resource_path, 19302 method=method, 19303 path_params=path_params, 19304 header_params=header_params, 19305 body=update_drg_route_table_details, 19306 response_type="DrgRouteTable") 19307 else: 19308 return self.base_client.call_api( 19309 resource_path=resource_path, 19310 method=method, 19311 path_params=path_params, 19312 header_params=header_params, 19313 body=update_drg_route_table_details, 19314 response_type="DrgRouteTable") 19315 19316 def update_internet_gateway(self, ig_id, update_internet_gateway_details, **kwargs): 19317 """ 19318 Updates the specified internet gateway. You can disable/enable it, or change its display name 19319 or tags. Avoid entering confidential information. 19320 19321 If the gateway is disabled, that means no traffic will flow to/from the internet even if there's 19322 a route rule that enables that traffic. 19323 19324 19325 :param str ig_id: (required) 19326 The `OCID`__ of the internet gateway. 19327 19328 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 19329 19330 :param oci.core.models.UpdateInternetGatewayDetails update_internet_gateway_details: (required) 19331 Details for updating the internet gateway. 19332 19333 :param str if_match: (optional) 19334 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 19335 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 19336 will be updated or deleted only if the etag you provide matches the resource's current etag value. 19337 19338 :param obj retry_strategy: (optional) 19339 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19340 19341 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. 19342 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19343 19344 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19345 19346 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.InternetGateway` 19347 :rtype: :class:`~oci.response.Response` 19348 19349 :example: 19350 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_internet_gateway.py.html>`__ to see an example of how to use update_internet_gateway API. 19351 """ 19352 resource_path = "/internetGateways/{igId}" 19353 method = "PUT" 19354 19355 # Don't accept unknown kwargs 19356 expected_kwargs = [ 19357 "retry_strategy", 19358 "if_match" 19359 ] 19360 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19361 if extra_kwargs: 19362 raise ValueError( 19363 "update_internet_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 19364 19365 path_params = { 19366 "igId": ig_id 19367 } 19368 19369 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19370 19371 for (k, v) in six.iteritems(path_params): 19372 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19373 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19374 19375 header_params = { 19376 "accept": "application/json", 19377 "content-type": "application/json", 19378 "if-match": kwargs.get("if_match", missing) 19379 } 19380 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 19381 19382 retry_strategy = self.base_client.get_preferred_retry_strategy( 19383 operation_retry_strategy=kwargs.get('retry_strategy'), 19384 client_retry_strategy=self.retry_strategy 19385 ) 19386 19387 if retry_strategy: 19388 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19389 self.base_client.add_opc_client_retries_header(header_params) 19390 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19391 return retry_strategy.make_retrying_call( 19392 self.base_client.call_api, 19393 resource_path=resource_path, 19394 method=method, 19395 path_params=path_params, 19396 header_params=header_params, 19397 body=update_internet_gateway_details, 19398 response_type="InternetGateway") 19399 else: 19400 return self.base_client.call_api( 19401 resource_path=resource_path, 19402 method=method, 19403 path_params=path_params, 19404 header_params=header_params, 19405 body=update_internet_gateway_details, 19406 response_type="InternetGateway") 19407 19408 def update_ip_sec_connection(self, ipsc_id, update_ip_sec_connection_details, **kwargs): 19409 """ 19410 Updates the specified IPSec connection. 19411 19412 To update an individual IPSec tunnel's attributes, use 19413 :func:`update_ip_sec_connection_tunnel`. 19414 19415 19416 :param str ipsc_id: (required) 19417 The `OCID`__ of the IPSec connection. 19418 19419 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 19420 19421 :param oci.core.models.UpdateIPSecConnectionDetails update_ip_sec_connection_details: (required) 19422 Details object for updating an IPSec connection. 19423 19424 :param str if_match: (optional) 19425 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 19426 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 19427 will be updated or deleted only if the etag you provide matches the resource's current etag value. 19428 19429 :param obj retry_strategy: (optional) 19430 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19431 19432 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. 19433 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19434 19435 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19436 19437 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnection` 19438 :rtype: :class:`~oci.response.Response` 19439 19440 :example: 19441 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_ip_sec_connection.py.html>`__ to see an example of how to use update_ip_sec_connection API. 19442 """ 19443 resource_path = "/ipsecConnections/{ipscId}" 19444 method = "PUT" 19445 19446 # Don't accept unknown kwargs 19447 expected_kwargs = [ 19448 "retry_strategy", 19449 "if_match" 19450 ] 19451 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19452 if extra_kwargs: 19453 raise ValueError( 19454 "update_ip_sec_connection got unknown kwargs: {!r}".format(extra_kwargs)) 19455 19456 path_params = { 19457 "ipscId": ipsc_id 19458 } 19459 19460 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19461 19462 for (k, v) in six.iteritems(path_params): 19463 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19464 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19465 19466 header_params = { 19467 "accept": "application/json", 19468 "content-type": "application/json", 19469 "if-match": kwargs.get("if_match", missing) 19470 } 19471 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 19472 19473 retry_strategy = self.base_client.get_preferred_retry_strategy( 19474 operation_retry_strategy=kwargs.get('retry_strategy'), 19475 client_retry_strategy=self.retry_strategy 19476 ) 19477 19478 if retry_strategy: 19479 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19480 self.base_client.add_opc_client_retries_header(header_params) 19481 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19482 return retry_strategy.make_retrying_call( 19483 self.base_client.call_api, 19484 resource_path=resource_path, 19485 method=method, 19486 path_params=path_params, 19487 header_params=header_params, 19488 body=update_ip_sec_connection_details, 19489 response_type="IPSecConnection") 19490 else: 19491 return self.base_client.call_api( 19492 resource_path=resource_path, 19493 method=method, 19494 path_params=path_params, 19495 header_params=header_params, 19496 body=update_ip_sec_connection_details, 19497 response_type="IPSecConnection") 19498 19499 def update_ip_sec_connection_tunnel(self, ipsc_id, tunnel_id, update_ip_sec_connection_tunnel_details, **kwargs): 19500 """ 19501 Updates the specified tunnel. This operation lets you change tunnel attributes such as the 19502 routing type (BGP dynamic routing or static routing). Here are some important notes: 19503 19504 * If you change the tunnel's routing type or BGP session configuration, the tunnel will go 19505 down while it's reprovisioned. 19506 19507 * If you want to switch the tunnel's `routing` from `STATIC` to `BGP`, make sure the tunnel's 19508 BGP session configuration attributes have been set (:func:`bgp_session_info`). 19509 19510 * If you want to switch the tunnel's `routing` from `BGP` to `STATIC`, make sure the 19511 :class:`IPSecConnection` already has at least one valid CIDR 19512 static route. 19513 19514 19515 :param str ipsc_id: (required) 19516 The `OCID`__ of the IPSec connection. 19517 19518 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 19519 19520 :param str tunnel_id: (required) 19521 The `OCID`__ of the tunnel. 19522 19523 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 19524 19525 :param oci.core.models.UpdateIPSecConnectionTunnelDetails update_ip_sec_connection_tunnel_details: (required) 19526 Details object for updating a IPSecConnection tunnel's details. 19527 19528 :param str if_match: (optional) 19529 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 19530 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 19531 will be updated or deleted only if the etag you provide matches the resource's current etag value. 19532 19533 :param str opc_request_id: (optional) 19534 Unique identifier for the request. 19535 If you need to contact Oracle about a particular request, please provide the request ID. 19536 19537 :param obj retry_strategy: (optional) 19538 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19539 19540 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. 19541 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19542 19543 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19544 19545 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnectionTunnel` 19546 :rtype: :class:`~oci.response.Response` 19547 19548 :example: 19549 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_ip_sec_connection_tunnel.py.html>`__ to see an example of how to use update_ip_sec_connection_tunnel API. 19550 """ 19551 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}" 19552 method = "PUT" 19553 19554 # Don't accept unknown kwargs 19555 expected_kwargs = [ 19556 "retry_strategy", 19557 "if_match", 19558 "opc_request_id" 19559 ] 19560 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19561 if extra_kwargs: 19562 raise ValueError( 19563 "update_ip_sec_connection_tunnel got unknown kwargs: {!r}".format(extra_kwargs)) 19564 19565 path_params = { 19566 "ipscId": ipsc_id, 19567 "tunnelId": tunnel_id 19568 } 19569 19570 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19571 19572 for (k, v) in six.iteritems(path_params): 19573 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19574 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19575 19576 header_params = { 19577 "accept": "application/json", 19578 "content-type": "application/json", 19579 "if-match": kwargs.get("if_match", missing), 19580 "opc-request-id": kwargs.get("opc_request_id", missing) 19581 } 19582 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 19583 19584 retry_strategy = self.base_client.get_preferred_retry_strategy( 19585 operation_retry_strategy=kwargs.get('retry_strategy'), 19586 client_retry_strategy=self.retry_strategy 19587 ) 19588 19589 if retry_strategy: 19590 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19591 self.base_client.add_opc_client_retries_header(header_params) 19592 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19593 return retry_strategy.make_retrying_call( 19594 self.base_client.call_api, 19595 resource_path=resource_path, 19596 method=method, 19597 path_params=path_params, 19598 header_params=header_params, 19599 body=update_ip_sec_connection_tunnel_details, 19600 response_type="IPSecConnectionTunnel") 19601 else: 19602 return self.base_client.call_api( 19603 resource_path=resource_path, 19604 method=method, 19605 path_params=path_params, 19606 header_params=header_params, 19607 body=update_ip_sec_connection_tunnel_details, 19608 response_type="IPSecConnectionTunnel") 19609 19610 def update_ip_sec_connection_tunnel_shared_secret(self, ipsc_id, tunnel_id, update_ip_sec_connection_tunnel_shared_secret_details, **kwargs): 19611 """ 19612 Updates the shared secret (pre-shared key) for the specified tunnel. 19613 19614 **Important:** If you change the shared secret, the tunnel will go down while it's reprovisioned. 19615 19616 19617 :param str ipsc_id: (required) 19618 The `OCID`__ of the IPSec connection. 19619 19620 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 19621 19622 :param str tunnel_id: (required) 19623 The `OCID`__ of the tunnel. 19624 19625 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 19626 19627 :param oci.core.models.UpdateIPSecConnectionTunnelSharedSecretDetails update_ip_sec_connection_tunnel_shared_secret_details: (required) 19628 Details object for updating a IPSec connection tunnel's sharedSecret. 19629 19630 :param str if_match: (optional) 19631 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 19632 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 19633 will be updated or deleted only if the etag you provide matches the resource's current etag value. 19634 19635 :param obj retry_strategy: (optional) 19636 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19637 19638 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. 19639 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19640 19641 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19642 19643 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IPSecConnectionTunnelSharedSecret` 19644 :rtype: :class:`~oci.response.Response` 19645 19646 :example: 19647 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_ip_sec_connection_tunnel_shared_secret.py.html>`__ to see an example of how to use update_ip_sec_connection_tunnel_shared_secret API. 19648 """ 19649 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/sharedSecret" 19650 method = "PUT" 19651 19652 # Don't accept unknown kwargs 19653 expected_kwargs = [ 19654 "retry_strategy", 19655 "if_match" 19656 ] 19657 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19658 if extra_kwargs: 19659 raise ValueError( 19660 "update_ip_sec_connection_tunnel_shared_secret got unknown kwargs: {!r}".format(extra_kwargs)) 19661 19662 path_params = { 19663 "ipscId": ipsc_id, 19664 "tunnelId": tunnel_id 19665 } 19666 19667 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19668 19669 for (k, v) in six.iteritems(path_params): 19670 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19671 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19672 19673 header_params = { 19674 "accept": "application/json", 19675 "content-type": "application/json", 19676 "if-match": kwargs.get("if_match", missing) 19677 } 19678 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 19679 19680 retry_strategy = self.base_client.get_preferred_retry_strategy( 19681 operation_retry_strategy=kwargs.get('retry_strategy'), 19682 client_retry_strategy=self.retry_strategy 19683 ) 19684 19685 if retry_strategy: 19686 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19687 self.base_client.add_opc_client_retries_header(header_params) 19688 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19689 return retry_strategy.make_retrying_call( 19690 self.base_client.call_api, 19691 resource_path=resource_path, 19692 method=method, 19693 path_params=path_params, 19694 header_params=header_params, 19695 body=update_ip_sec_connection_tunnel_shared_secret_details, 19696 response_type="IPSecConnectionTunnelSharedSecret") 19697 else: 19698 return self.base_client.call_api( 19699 resource_path=resource_path, 19700 method=method, 19701 path_params=path_params, 19702 header_params=header_params, 19703 body=update_ip_sec_connection_tunnel_shared_secret_details, 19704 response_type="IPSecConnectionTunnelSharedSecret") 19705 19706 def update_ipv6(self, ipv6_id, update_ipv6_details, **kwargs): 19707 """ 19708 Updates the specified IPv6. You must specify the object's `OCID`__. 19709 Use this operation if you want to: 19710 19711 * Move an IPv6 to a different VNIC in the same subnet. 19712 * Enable/disable internet access for an IPv6. 19713 * Change the display name for an IPv6. 19714 * Update resource tags for an IPv6. 19715 19716 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 19717 19718 19719 :param str ipv6_id: (required) 19720 The `OCID`__ of the IPv6. 19721 19722 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 19723 19724 :param oci.core.models.UpdateIpv6Details update_ipv6_details: (required) 19725 IPv6 details to be updated. 19726 19727 :param str if_match: (optional) 19728 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 19729 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 19730 will be updated or deleted only if the etag you provide matches the resource's current etag value. 19731 19732 :param str opc_request_id: (optional) 19733 Unique identifier for the request. 19734 If you need to contact Oracle about a particular request, please provide the request ID. 19735 19736 :param obj retry_strategy: (optional) 19737 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19738 19739 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. 19740 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19741 19742 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19743 19744 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Ipv6` 19745 :rtype: :class:`~oci.response.Response` 19746 19747 :example: 19748 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_ipv6.py.html>`__ to see an example of how to use update_ipv6 API. 19749 """ 19750 resource_path = "/ipv6/{ipv6Id}" 19751 method = "PUT" 19752 19753 # Don't accept unknown kwargs 19754 expected_kwargs = [ 19755 "retry_strategy", 19756 "if_match", 19757 "opc_request_id" 19758 ] 19759 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19760 if extra_kwargs: 19761 raise ValueError( 19762 "update_ipv6 got unknown kwargs: {!r}".format(extra_kwargs)) 19763 19764 path_params = { 19765 "ipv6Id": ipv6_id 19766 } 19767 19768 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19769 19770 for (k, v) in six.iteritems(path_params): 19771 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19772 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19773 19774 header_params = { 19775 "accept": "application/json", 19776 "content-type": "application/json", 19777 "if-match": kwargs.get("if_match", missing), 19778 "opc-request-id": kwargs.get("opc_request_id", missing) 19779 } 19780 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 19781 19782 retry_strategy = self.base_client.get_preferred_retry_strategy( 19783 operation_retry_strategy=kwargs.get('retry_strategy'), 19784 client_retry_strategy=self.retry_strategy 19785 ) 19786 19787 if retry_strategy: 19788 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19789 self.base_client.add_opc_client_retries_header(header_params) 19790 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19791 return retry_strategy.make_retrying_call( 19792 self.base_client.call_api, 19793 resource_path=resource_path, 19794 method=method, 19795 path_params=path_params, 19796 header_params=header_params, 19797 body=update_ipv6_details, 19798 response_type="Ipv6") 19799 else: 19800 return self.base_client.call_api( 19801 resource_path=resource_path, 19802 method=method, 19803 path_params=path_params, 19804 header_params=header_params, 19805 body=update_ipv6_details, 19806 response_type="Ipv6") 19807 19808 def update_local_peering_gateway(self, local_peering_gateway_id, update_local_peering_gateway_details, **kwargs): 19809 """ 19810 Updates the specified local peering gateway (LPG). 19811 19812 19813 :param str local_peering_gateway_id: (required) 19814 The `OCID`__ of the local peering gateway. 19815 19816 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 19817 19818 :param oci.core.models.UpdateLocalPeeringGatewayDetails update_local_peering_gateway_details: (required) 19819 Details object for updating a local peering gateway. 19820 19821 :param str if_match: (optional) 19822 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 19823 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 19824 will be updated or deleted only if the etag you provide matches the resource's current etag value. 19825 19826 :param obj retry_strategy: (optional) 19827 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19828 19829 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. 19830 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19831 19832 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19833 19834 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.LocalPeeringGateway` 19835 :rtype: :class:`~oci.response.Response` 19836 19837 :example: 19838 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_local_peering_gateway.py.html>`__ to see an example of how to use update_local_peering_gateway API. 19839 """ 19840 resource_path = "/localPeeringGateways/{localPeeringGatewayId}" 19841 method = "PUT" 19842 19843 # Don't accept unknown kwargs 19844 expected_kwargs = [ 19845 "retry_strategy", 19846 "if_match" 19847 ] 19848 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19849 if extra_kwargs: 19850 raise ValueError( 19851 "update_local_peering_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 19852 19853 path_params = { 19854 "localPeeringGatewayId": local_peering_gateway_id 19855 } 19856 19857 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19858 19859 for (k, v) in six.iteritems(path_params): 19860 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19861 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19862 19863 header_params = { 19864 "accept": "application/json", 19865 "content-type": "application/json", 19866 "if-match": kwargs.get("if_match", missing) 19867 } 19868 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 19869 19870 retry_strategy = self.base_client.get_preferred_retry_strategy( 19871 operation_retry_strategy=kwargs.get('retry_strategy'), 19872 client_retry_strategy=self.retry_strategy 19873 ) 19874 19875 if retry_strategy: 19876 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19877 self.base_client.add_opc_client_retries_header(header_params) 19878 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19879 return retry_strategy.make_retrying_call( 19880 self.base_client.call_api, 19881 resource_path=resource_path, 19882 method=method, 19883 path_params=path_params, 19884 header_params=header_params, 19885 body=update_local_peering_gateway_details, 19886 response_type="LocalPeeringGateway") 19887 else: 19888 return self.base_client.call_api( 19889 resource_path=resource_path, 19890 method=method, 19891 path_params=path_params, 19892 header_params=header_params, 19893 body=update_local_peering_gateway_details, 19894 response_type="LocalPeeringGateway") 19895 19896 def update_nat_gateway(self, nat_gateway_id, update_nat_gateway_details, **kwargs): 19897 """ 19898 Updates the specified NAT gateway. 19899 19900 19901 :param str nat_gateway_id: (required) 19902 The NAT gateway's `OCID`__. 19903 19904 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 19905 19906 :param oci.core.models.UpdateNatGatewayDetails update_nat_gateway_details: (required) 19907 Details object for updating a NAT gateway. 19908 19909 :param str if_match: (optional) 19910 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 19911 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 19912 will be updated or deleted only if the etag you provide matches the resource's current etag value. 19913 19914 :param obj retry_strategy: (optional) 19915 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 19916 19917 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. 19918 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 19919 19920 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 19921 19922 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.NatGateway` 19923 :rtype: :class:`~oci.response.Response` 19924 19925 :example: 19926 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_nat_gateway.py.html>`__ to see an example of how to use update_nat_gateway API. 19927 """ 19928 resource_path = "/natGateways/{natGatewayId}" 19929 method = "PUT" 19930 19931 # Don't accept unknown kwargs 19932 expected_kwargs = [ 19933 "retry_strategy", 19934 "if_match" 19935 ] 19936 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 19937 if extra_kwargs: 19938 raise ValueError( 19939 "update_nat_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 19940 19941 path_params = { 19942 "natGatewayId": nat_gateway_id 19943 } 19944 19945 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 19946 19947 for (k, v) in six.iteritems(path_params): 19948 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 19949 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 19950 19951 header_params = { 19952 "accept": "application/json", 19953 "content-type": "application/json", 19954 "if-match": kwargs.get("if_match", missing) 19955 } 19956 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 19957 19958 retry_strategy = self.base_client.get_preferred_retry_strategy( 19959 operation_retry_strategy=kwargs.get('retry_strategy'), 19960 client_retry_strategy=self.retry_strategy 19961 ) 19962 19963 if retry_strategy: 19964 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 19965 self.base_client.add_opc_client_retries_header(header_params) 19966 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 19967 return retry_strategy.make_retrying_call( 19968 self.base_client.call_api, 19969 resource_path=resource_path, 19970 method=method, 19971 path_params=path_params, 19972 header_params=header_params, 19973 body=update_nat_gateway_details, 19974 response_type="NatGateway") 19975 else: 19976 return self.base_client.call_api( 19977 resource_path=resource_path, 19978 method=method, 19979 path_params=path_params, 19980 header_params=header_params, 19981 body=update_nat_gateway_details, 19982 response_type="NatGateway") 19983 19984 def update_network_security_group(self, network_security_group_id, update_network_security_group_details, **kwargs): 19985 """ 19986 Updates the specified network security group. 19987 19988 To add or remove an existing VNIC from the group, use 19989 :func:`update_vnic`. 19990 19991 To add a VNIC to the group *when you create the VNIC*, specify the NSG's `OCID`__ during creation. 19992 For example, see the `nsgIds` attribute in :func:`create_vnic_details`. 19993 19994 To add or remove security rules from the group, use 19995 :func:`add_network_security_group_security_rules` 19996 or 19997 :func:`remove_network_security_group_security_rules`. 19998 19999 To edit the contents of existing security rules in the group, use 20000 :func:`update_network_security_group_security_rules`. 20001 20002 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 20003 20004 20005 :param str network_security_group_id: (required) 20006 The `OCID`__ of the network security group. 20007 20008 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 20009 20010 :param oci.core.models.UpdateNetworkSecurityGroupDetails update_network_security_group_details: (required) 20011 Details object for updating a network security group. 20012 20013 :param str if_match: (optional) 20014 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20015 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20016 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20017 20018 :param obj retry_strategy: (optional) 20019 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20020 20021 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. 20022 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20023 20024 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20025 20026 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.NetworkSecurityGroup` 20027 :rtype: :class:`~oci.response.Response` 20028 20029 :example: 20030 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_network_security_group.py.html>`__ to see an example of how to use update_network_security_group API. 20031 """ 20032 resource_path = "/networkSecurityGroups/{networkSecurityGroupId}" 20033 method = "PUT" 20034 20035 # Don't accept unknown kwargs 20036 expected_kwargs = [ 20037 "retry_strategy", 20038 "if_match" 20039 ] 20040 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20041 if extra_kwargs: 20042 raise ValueError( 20043 "update_network_security_group got unknown kwargs: {!r}".format(extra_kwargs)) 20044 20045 path_params = { 20046 "networkSecurityGroupId": network_security_group_id 20047 } 20048 20049 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20050 20051 for (k, v) in six.iteritems(path_params): 20052 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20053 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20054 20055 header_params = { 20056 "accept": "application/json", 20057 "content-type": "application/json", 20058 "if-match": kwargs.get("if_match", missing) 20059 } 20060 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 20061 20062 retry_strategy = self.base_client.get_preferred_retry_strategy( 20063 operation_retry_strategy=kwargs.get('retry_strategy'), 20064 client_retry_strategy=self.retry_strategy 20065 ) 20066 20067 if retry_strategy: 20068 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20069 self.base_client.add_opc_client_retries_header(header_params) 20070 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20071 return retry_strategy.make_retrying_call( 20072 self.base_client.call_api, 20073 resource_path=resource_path, 20074 method=method, 20075 path_params=path_params, 20076 header_params=header_params, 20077 body=update_network_security_group_details, 20078 response_type="NetworkSecurityGroup") 20079 else: 20080 return self.base_client.call_api( 20081 resource_path=resource_path, 20082 method=method, 20083 path_params=path_params, 20084 header_params=header_params, 20085 body=update_network_security_group_details, 20086 response_type="NetworkSecurityGroup") 20087 20088 def update_network_security_group_security_rules(self, network_security_group_id, update_network_security_group_security_rules_details, **kwargs): 20089 """ 20090 Updates one or more security rules in the specified network security group. 20091 20092 20093 :param str network_security_group_id: (required) 20094 The `OCID`__ of the network security group. 20095 20096 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 20097 20098 :param oci.core.models.UpdateNetworkSecurityGroupSecurityRulesDetails update_network_security_group_security_rules_details: (required) 20099 Request with one or more security rules associated with the network security group that 20100 will be updated. 20101 20102 :param obj retry_strategy: (optional) 20103 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20104 20105 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. 20106 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20107 20108 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20109 20110 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.UpdatedNetworkSecurityGroupSecurityRules` 20111 :rtype: :class:`~oci.response.Response` 20112 20113 :example: 20114 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_network_security_group_security_rules.py.html>`__ to see an example of how to use update_network_security_group_security_rules API. 20115 """ 20116 resource_path = "/networkSecurityGroups/{networkSecurityGroupId}/actions/updateSecurityRules" 20117 method = "POST" 20118 20119 expected_kwargs = ["retry_strategy"] 20120 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20121 if extra_kwargs: 20122 raise ValueError( 20123 "update_network_security_group_security_rules got unknown kwargs: {!r}".format(extra_kwargs)) 20124 20125 path_params = { 20126 "networkSecurityGroupId": network_security_group_id 20127 } 20128 20129 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20130 20131 for (k, v) in six.iteritems(path_params): 20132 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20133 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20134 20135 header_params = { 20136 "accept": "application/json", 20137 "content-type": "application/json" 20138 } 20139 20140 retry_strategy = self.base_client.get_preferred_retry_strategy( 20141 operation_retry_strategy=kwargs.get('retry_strategy'), 20142 client_retry_strategy=self.retry_strategy 20143 ) 20144 20145 if retry_strategy: 20146 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20147 self.base_client.add_opc_client_retries_header(header_params) 20148 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20149 return retry_strategy.make_retrying_call( 20150 self.base_client.call_api, 20151 resource_path=resource_path, 20152 method=method, 20153 path_params=path_params, 20154 header_params=header_params, 20155 body=update_network_security_group_security_rules_details, 20156 response_type="UpdatedNetworkSecurityGroupSecurityRules") 20157 else: 20158 return self.base_client.call_api( 20159 resource_path=resource_path, 20160 method=method, 20161 path_params=path_params, 20162 header_params=header_params, 20163 body=update_network_security_group_security_rules_details, 20164 response_type="UpdatedNetworkSecurityGroupSecurityRules") 20165 20166 def update_private_ip(self, private_ip_id, update_private_ip_details, **kwargs): 20167 """ 20168 Updates the specified private IP. You must specify the object's `OCID`__. 20169 Use this operation if you want to: 20170 20171 - Move a secondary private IP to a different VNIC in the same subnet. 20172 - Change the display name for a secondary private IP. 20173 - Change the hostname for a secondary private IP. 20174 20175 This operation cannot be used with primary private IPs. 20176 To update the hostname for the primary IP on a VNIC, use 20177 :func:`update_vnic`. 20178 20179 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 20180 20181 20182 :param str private_ip_id: (required) 20183 The `OCID`__ of the private IP. 20184 20185 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 20186 20187 :param oci.core.models.UpdatePrivateIpDetails update_private_ip_details: (required) 20188 Private IP details. 20189 20190 :param str if_match: (optional) 20191 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20192 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20193 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20194 20195 :param obj retry_strategy: (optional) 20196 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20197 20198 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. 20199 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20200 20201 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20202 20203 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PrivateIp` 20204 :rtype: :class:`~oci.response.Response` 20205 20206 :example: 20207 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_private_ip.py.html>`__ to see an example of how to use update_private_ip API. 20208 """ 20209 resource_path = "/privateIps/{privateIpId}" 20210 method = "PUT" 20211 20212 # Don't accept unknown kwargs 20213 expected_kwargs = [ 20214 "retry_strategy", 20215 "if_match" 20216 ] 20217 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20218 if extra_kwargs: 20219 raise ValueError( 20220 "update_private_ip got unknown kwargs: {!r}".format(extra_kwargs)) 20221 20222 path_params = { 20223 "privateIpId": private_ip_id 20224 } 20225 20226 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20227 20228 for (k, v) in six.iteritems(path_params): 20229 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20230 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20231 20232 header_params = { 20233 "accept": "application/json", 20234 "content-type": "application/json", 20235 "if-match": kwargs.get("if_match", missing) 20236 } 20237 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 20238 20239 retry_strategy = self.base_client.get_preferred_retry_strategy( 20240 operation_retry_strategy=kwargs.get('retry_strategy'), 20241 client_retry_strategy=self.retry_strategy 20242 ) 20243 20244 if retry_strategy: 20245 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20246 self.base_client.add_opc_client_retries_header(header_params) 20247 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20248 return retry_strategy.make_retrying_call( 20249 self.base_client.call_api, 20250 resource_path=resource_path, 20251 method=method, 20252 path_params=path_params, 20253 header_params=header_params, 20254 body=update_private_ip_details, 20255 response_type="PrivateIp") 20256 else: 20257 return self.base_client.call_api( 20258 resource_path=resource_path, 20259 method=method, 20260 path_params=path_params, 20261 header_params=header_params, 20262 body=update_private_ip_details, 20263 response_type="PrivateIp") 20264 20265 def update_public_ip(self, public_ip_id, update_public_ip_details, **kwargs): 20266 """ 20267 Updates the specified public IP. You must specify the object's `OCID`__. Use this operation if you want to: 20268 20269 * Assign a reserved public IP in your pool to a private IP. 20270 * Move a reserved public IP to a different private IP. 20271 * Unassign a reserved public IP from a private IP (which returns it to your pool 20272 of reserved public IPs). 20273 * Change the display name or tags for a public IP. 20274 20275 Assigning, moving, and unassigning a reserved public IP are asynchronous 20276 operations. Poll the public IP's `lifecycleState` to determine if the operation 20277 succeeded. 20278 20279 **Note:** When moving a reserved public IP, the target private IP 20280 must not already have a public IP with `lifecycleState` = ASSIGNING or ASSIGNED. If it 20281 does, an error is returned. Also, the initial unassignment from the original 20282 private IP always succeeds, but the assignment to the target private IP is asynchronous and 20283 could fail silently (for example, if the target private IP is deleted or has a different public IP 20284 assigned to it in the interim). If that occurs, the public IP remains unassigned and its 20285 `lifecycleState` switches to AVAILABLE (it is not reassigned to its original private IP). 20286 You must poll the public IP's `lifecycleState` to determine if the move succeeded. 20287 20288 Regarding ephemeral public IPs: 20289 20290 * If you want to assign an ephemeral public IP to a primary private IP, use 20291 :func:`create_public_ip`. 20292 * You can't move an ephemeral public IP to a different private IP. 20293 * If you want to unassign an ephemeral public IP from its private IP, use 20294 :func:`delete_public_ip`, which 20295 unassigns and deletes the ephemeral public IP. 20296 20297 **Note:** If a public IP is assigned to a secondary private 20298 IP (see :class:`PrivateIp`), and you move that secondary 20299 private IP to another VNIC, the public IP moves with it. 20300 20301 **Note:** There's a limit to the number of :class:`PublicIp` 20302 a VNIC or instance can have. If you try to move a reserved public IP 20303 to a VNIC or instance that has already reached its public IP limit, an error is 20304 returned. For information about the public IP limits, see 20305 `Public IP Addresses`__. 20306 20307 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 20308 __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm 20309 20310 20311 :param str public_ip_id: (required) 20312 The `OCID`__ of the public IP. 20313 20314 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 20315 20316 :param oci.core.models.UpdatePublicIpDetails update_public_ip_details: (required) 20317 Public IP details. 20318 20319 :param str if_match: (optional) 20320 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20321 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20322 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20323 20324 :param obj retry_strategy: (optional) 20325 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20326 20327 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. 20328 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20329 20330 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20331 20332 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIp` 20333 :rtype: :class:`~oci.response.Response` 20334 20335 :example: 20336 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_public_ip.py.html>`__ to see an example of how to use update_public_ip API. 20337 """ 20338 resource_path = "/publicIps/{publicIpId}" 20339 method = "PUT" 20340 20341 # Don't accept unknown kwargs 20342 expected_kwargs = [ 20343 "retry_strategy", 20344 "if_match" 20345 ] 20346 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20347 if extra_kwargs: 20348 raise ValueError( 20349 "update_public_ip got unknown kwargs: {!r}".format(extra_kwargs)) 20350 20351 path_params = { 20352 "publicIpId": public_ip_id 20353 } 20354 20355 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20356 20357 for (k, v) in six.iteritems(path_params): 20358 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20359 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20360 20361 header_params = { 20362 "accept": "application/json", 20363 "content-type": "application/json", 20364 "if-match": kwargs.get("if_match", missing) 20365 } 20366 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 20367 20368 retry_strategy = self.base_client.get_preferred_retry_strategy( 20369 operation_retry_strategy=kwargs.get('retry_strategy'), 20370 client_retry_strategy=self.retry_strategy 20371 ) 20372 20373 if retry_strategy: 20374 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20375 self.base_client.add_opc_client_retries_header(header_params) 20376 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20377 return retry_strategy.make_retrying_call( 20378 self.base_client.call_api, 20379 resource_path=resource_path, 20380 method=method, 20381 path_params=path_params, 20382 header_params=header_params, 20383 body=update_public_ip_details, 20384 response_type="PublicIp") 20385 else: 20386 return self.base_client.call_api( 20387 resource_path=resource_path, 20388 method=method, 20389 path_params=path_params, 20390 header_params=header_params, 20391 body=update_public_ip_details, 20392 response_type="PublicIp") 20393 20394 def update_public_ip_pool(self, public_ip_pool_id, update_public_ip_pool_details, **kwargs): 20395 """ 20396 Updates the specified public IP pool. 20397 20398 20399 :param str public_ip_pool_id: (required) 20400 The `OCID`__ of the public IP pool. 20401 20402 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 20403 20404 :param oci.core.models.UpdatePublicIpPoolDetails update_public_ip_pool_details: (required) 20405 Public IP pool details. 20406 20407 :param str opc_request_id: (optional) 20408 Unique identifier for the request. 20409 If you need to contact Oracle about a particular request, please provide the request ID. 20410 20411 :param str if_match: (optional) 20412 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20413 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20414 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20415 20416 :param obj retry_strategy: (optional) 20417 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20418 20419 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. 20420 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20421 20422 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20423 20424 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` 20425 :rtype: :class:`~oci.response.Response` 20426 20427 :example: 20428 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_public_ip_pool.py.html>`__ to see an example of how to use update_public_ip_pool API. 20429 """ 20430 resource_path = "/publicIpPools/{publicIpPoolId}" 20431 method = "PUT" 20432 20433 # Don't accept unknown kwargs 20434 expected_kwargs = [ 20435 "retry_strategy", 20436 "opc_request_id", 20437 "if_match" 20438 ] 20439 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20440 if extra_kwargs: 20441 raise ValueError( 20442 "update_public_ip_pool got unknown kwargs: {!r}".format(extra_kwargs)) 20443 20444 path_params = { 20445 "publicIpPoolId": public_ip_pool_id 20446 } 20447 20448 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20449 20450 for (k, v) in six.iteritems(path_params): 20451 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20452 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20453 20454 header_params = { 20455 "accept": "application/json", 20456 "content-type": "application/json", 20457 "opc-request-id": kwargs.get("opc_request_id", missing), 20458 "if-match": kwargs.get("if_match", missing) 20459 } 20460 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 20461 20462 retry_strategy = self.base_client.get_preferred_retry_strategy( 20463 operation_retry_strategy=kwargs.get('retry_strategy'), 20464 client_retry_strategy=self.retry_strategy 20465 ) 20466 20467 if retry_strategy: 20468 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20469 self.base_client.add_opc_client_retries_header(header_params) 20470 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20471 return retry_strategy.make_retrying_call( 20472 self.base_client.call_api, 20473 resource_path=resource_path, 20474 method=method, 20475 path_params=path_params, 20476 header_params=header_params, 20477 body=update_public_ip_pool_details, 20478 response_type="PublicIpPool") 20479 else: 20480 return self.base_client.call_api( 20481 resource_path=resource_path, 20482 method=method, 20483 path_params=path_params, 20484 header_params=header_params, 20485 body=update_public_ip_pool_details, 20486 response_type="PublicIpPool") 20487 20488 def update_remote_peering_connection(self, remote_peering_connection_id, update_remote_peering_connection_details, **kwargs): 20489 """ 20490 Updates the specified remote peering connection (RPC). 20491 20492 20493 :param str remote_peering_connection_id: (required) 20494 The `OCID`__ of the remote peering connection (RPC). 20495 20496 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 20497 20498 :param oci.core.models.UpdateRemotePeeringConnectionDetails update_remote_peering_connection_details: (required) 20499 Request to the update the peering connection to remote region 20500 20501 :param str if_match: (optional) 20502 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20503 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20504 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20505 20506 :param obj retry_strategy: (optional) 20507 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20508 20509 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. 20510 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20511 20512 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20513 20514 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.RemotePeeringConnection` 20515 :rtype: :class:`~oci.response.Response` 20516 20517 :example: 20518 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_remote_peering_connection.py.html>`__ to see an example of how to use update_remote_peering_connection API. 20519 """ 20520 resource_path = "/remotePeeringConnections/{remotePeeringConnectionId}" 20521 method = "PUT" 20522 20523 # Don't accept unknown kwargs 20524 expected_kwargs = [ 20525 "retry_strategy", 20526 "if_match" 20527 ] 20528 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20529 if extra_kwargs: 20530 raise ValueError( 20531 "update_remote_peering_connection got unknown kwargs: {!r}".format(extra_kwargs)) 20532 20533 path_params = { 20534 "remotePeeringConnectionId": remote_peering_connection_id 20535 } 20536 20537 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20538 20539 for (k, v) in six.iteritems(path_params): 20540 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20541 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20542 20543 header_params = { 20544 "accept": "application/json", 20545 "content-type": "application/json", 20546 "if-match": kwargs.get("if_match", missing) 20547 } 20548 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 20549 20550 retry_strategy = self.base_client.get_preferred_retry_strategy( 20551 operation_retry_strategy=kwargs.get('retry_strategy'), 20552 client_retry_strategy=self.retry_strategy 20553 ) 20554 20555 if retry_strategy: 20556 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20557 self.base_client.add_opc_client_retries_header(header_params) 20558 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20559 return retry_strategy.make_retrying_call( 20560 self.base_client.call_api, 20561 resource_path=resource_path, 20562 method=method, 20563 path_params=path_params, 20564 header_params=header_params, 20565 body=update_remote_peering_connection_details, 20566 response_type="RemotePeeringConnection") 20567 else: 20568 return self.base_client.call_api( 20569 resource_path=resource_path, 20570 method=method, 20571 path_params=path_params, 20572 header_params=header_params, 20573 body=update_remote_peering_connection_details, 20574 response_type="RemotePeeringConnection") 20575 20576 def update_route_table(self, rt_id, update_route_table_details, **kwargs): 20577 """ 20578 Updates the specified route table's display name or route rules. 20579 Avoid entering confidential information. 20580 20581 Note that the `routeRules` object you provide replaces the entire existing set of rules. 20582 20583 20584 :param str rt_id: (required) 20585 The `OCID`__ of the route table. 20586 20587 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 20588 20589 :param oci.core.models.UpdateRouteTableDetails update_route_table_details: (required) 20590 Details object for updating a route table. 20591 20592 :param str if_match: (optional) 20593 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20594 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20595 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20596 20597 :param obj retry_strategy: (optional) 20598 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20599 20600 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. 20601 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20602 20603 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20604 20605 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.RouteTable` 20606 :rtype: :class:`~oci.response.Response` 20607 20608 :example: 20609 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_route_table.py.html>`__ to see an example of how to use update_route_table API. 20610 """ 20611 resource_path = "/routeTables/{rtId}" 20612 method = "PUT" 20613 20614 # Don't accept unknown kwargs 20615 expected_kwargs = [ 20616 "retry_strategy", 20617 "if_match" 20618 ] 20619 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20620 if extra_kwargs: 20621 raise ValueError( 20622 "update_route_table got unknown kwargs: {!r}".format(extra_kwargs)) 20623 20624 path_params = { 20625 "rtId": rt_id 20626 } 20627 20628 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20629 20630 for (k, v) in six.iteritems(path_params): 20631 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20632 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20633 20634 header_params = { 20635 "accept": "application/json", 20636 "content-type": "application/json", 20637 "if-match": kwargs.get("if_match", missing) 20638 } 20639 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 20640 20641 retry_strategy = self.base_client.get_preferred_retry_strategy( 20642 operation_retry_strategy=kwargs.get('retry_strategy'), 20643 client_retry_strategy=self.retry_strategy 20644 ) 20645 20646 if retry_strategy: 20647 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20648 self.base_client.add_opc_client_retries_header(header_params) 20649 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20650 return retry_strategy.make_retrying_call( 20651 self.base_client.call_api, 20652 resource_path=resource_path, 20653 method=method, 20654 path_params=path_params, 20655 header_params=header_params, 20656 body=update_route_table_details, 20657 response_type="RouteTable") 20658 else: 20659 return self.base_client.call_api( 20660 resource_path=resource_path, 20661 method=method, 20662 path_params=path_params, 20663 header_params=header_params, 20664 body=update_route_table_details, 20665 response_type="RouteTable") 20666 20667 def update_security_list(self, security_list_id, update_security_list_details, **kwargs): 20668 """ 20669 Updates the specified security list's display name or rules. 20670 Avoid entering confidential information. 20671 20672 Note that the `egressSecurityRules` or `ingressSecurityRules` objects you provide replace the entire 20673 existing objects. 20674 20675 20676 :param str security_list_id: (required) 20677 The `OCID`__ of the security list. 20678 20679 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 20680 20681 :param oci.core.models.UpdateSecurityListDetails update_security_list_details: (required) 20682 Updated details for the security list. 20683 20684 :param str if_match: (optional) 20685 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20686 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20687 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20688 20689 :param obj retry_strategy: (optional) 20690 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20691 20692 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. 20693 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20694 20695 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20696 20697 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.SecurityList` 20698 :rtype: :class:`~oci.response.Response` 20699 20700 :example: 20701 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_security_list.py.html>`__ to see an example of how to use update_security_list API. 20702 """ 20703 resource_path = "/securityLists/{securityListId}" 20704 method = "PUT" 20705 20706 # Don't accept unknown kwargs 20707 expected_kwargs = [ 20708 "retry_strategy", 20709 "if_match" 20710 ] 20711 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20712 if extra_kwargs: 20713 raise ValueError( 20714 "update_security_list got unknown kwargs: {!r}".format(extra_kwargs)) 20715 20716 path_params = { 20717 "securityListId": security_list_id 20718 } 20719 20720 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20721 20722 for (k, v) in six.iteritems(path_params): 20723 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20724 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20725 20726 header_params = { 20727 "accept": "application/json", 20728 "content-type": "application/json", 20729 "if-match": kwargs.get("if_match", missing) 20730 } 20731 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 20732 20733 retry_strategy = self.base_client.get_preferred_retry_strategy( 20734 operation_retry_strategy=kwargs.get('retry_strategy'), 20735 client_retry_strategy=self.retry_strategy 20736 ) 20737 20738 if retry_strategy: 20739 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20740 self.base_client.add_opc_client_retries_header(header_params) 20741 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20742 return retry_strategy.make_retrying_call( 20743 self.base_client.call_api, 20744 resource_path=resource_path, 20745 method=method, 20746 path_params=path_params, 20747 header_params=header_params, 20748 body=update_security_list_details, 20749 response_type="SecurityList") 20750 else: 20751 return self.base_client.call_api( 20752 resource_path=resource_path, 20753 method=method, 20754 path_params=path_params, 20755 header_params=header_params, 20756 body=update_security_list_details, 20757 response_type="SecurityList") 20758 20759 def update_service_gateway(self, service_gateway_id, update_service_gateway_details, **kwargs): 20760 """ 20761 Updates the specified service gateway. The information you provide overwrites the existing 20762 attributes of the gateway. 20763 20764 20765 :param str service_gateway_id: (required) 20766 The service gateway's `OCID`__. 20767 20768 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 20769 20770 :param oci.core.models.UpdateServiceGatewayDetails update_service_gateway_details: (required) 20771 Details object for updating a service gateway. 20772 20773 :param str if_match: (optional) 20774 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20775 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20776 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20777 20778 :param obj retry_strategy: (optional) 20779 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20780 20781 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. 20782 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20783 20784 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20785 20786 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ServiceGateway` 20787 :rtype: :class:`~oci.response.Response` 20788 20789 :example: 20790 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_service_gateway.py.html>`__ to see an example of how to use update_service_gateway API. 20791 """ 20792 resource_path = "/serviceGateways/{serviceGatewayId}" 20793 method = "PUT" 20794 20795 # Don't accept unknown kwargs 20796 expected_kwargs = [ 20797 "retry_strategy", 20798 "if_match" 20799 ] 20800 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20801 if extra_kwargs: 20802 raise ValueError( 20803 "update_service_gateway got unknown kwargs: {!r}".format(extra_kwargs)) 20804 20805 path_params = { 20806 "serviceGatewayId": service_gateway_id 20807 } 20808 20809 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20810 20811 for (k, v) in six.iteritems(path_params): 20812 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20813 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20814 20815 header_params = { 20816 "accept": "application/json", 20817 "content-type": "application/json", 20818 "if-match": kwargs.get("if_match", missing) 20819 } 20820 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 20821 20822 retry_strategy = self.base_client.get_preferred_retry_strategy( 20823 operation_retry_strategy=kwargs.get('retry_strategy'), 20824 client_retry_strategy=self.retry_strategy 20825 ) 20826 20827 if retry_strategy: 20828 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20829 self.base_client.add_opc_client_retries_header(header_params) 20830 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20831 return retry_strategy.make_retrying_call( 20832 self.base_client.call_api, 20833 resource_path=resource_path, 20834 method=method, 20835 path_params=path_params, 20836 header_params=header_params, 20837 body=update_service_gateway_details, 20838 response_type="ServiceGateway") 20839 else: 20840 return self.base_client.call_api( 20841 resource_path=resource_path, 20842 method=method, 20843 path_params=path_params, 20844 header_params=header_params, 20845 body=update_service_gateway_details, 20846 response_type="ServiceGateway") 20847 20848 def update_subnet(self, subnet_id, update_subnet_details, **kwargs): 20849 """ 20850 Updates the specified subnet. 20851 20852 20853 :param str subnet_id: (required) 20854 The `OCID`__ of the subnet. 20855 20856 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 20857 20858 :param oci.core.models.UpdateSubnetDetails update_subnet_details: (required) 20859 Details object for updating a subnet. 20860 20861 :param str if_match: (optional) 20862 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20863 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20864 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20865 20866 :param obj retry_strategy: (optional) 20867 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20868 20869 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. 20870 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20871 20872 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20873 20874 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Subnet` 20875 :rtype: :class:`~oci.response.Response` 20876 20877 :example: 20878 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_subnet.py.html>`__ to see an example of how to use update_subnet API. 20879 """ 20880 resource_path = "/subnets/{subnetId}" 20881 method = "PUT" 20882 20883 # Don't accept unknown kwargs 20884 expected_kwargs = [ 20885 "retry_strategy", 20886 "if_match" 20887 ] 20888 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20889 if extra_kwargs: 20890 raise ValueError( 20891 "update_subnet got unknown kwargs: {!r}".format(extra_kwargs)) 20892 20893 path_params = { 20894 "subnetId": subnet_id 20895 } 20896 20897 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 20898 20899 for (k, v) in six.iteritems(path_params): 20900 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 20901 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 20902 20903 header_params = { 20904 "accept": "application/json", 20905 "content-type": "application/json", 20906 "if-match": kwargs.get("if_match", missing) 20907 } 20908 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 20909 20910 retry_strategy = self.base_client.get_preferred_retry_strategy( 20911 operation_retry_strategy=kwargs.get('retry_strategy'), 20912 client_retry_strategy=self.retry_strategy 20913 ) 20914 20915 if retry_strategy: 20916 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 20917 self.base_client.add_opc_client_retries_header(header_params) 20918 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 20919 return retry_strategy.make_retrying_call( 20920 self.base_client.call_api, 20921 resource_path=resource_path, 20922 method=method, 20923 path_params=path_params, 20924 header_params=header_params, 20925 body=update_subnet_details, 20926 response_type="Subnet") 20927 else: 20928 return self.base_client.call_api( 20929 resource_path=resource_path, 20930 method=method, 20931 path_params=path_params, 20932 header_params=header_params, 20933 body=update_subnet_details, 20934 response_type="Subnet") 20935 20936 def update_tunnel_cpe_device_config(self, ipsc_id, tunnel_id, update_tunnel_cpe_device_config_details, **kwargs): 20937 """ 20938 Creates or updates the set of CPE configuration answers for the specified tunnel. 20939 The answers correlate to the questions that are specific to the CPE device type (see the 20940 `parameters` attribute of :class:`CpeDeviceShapeDetail`). 20941 20942 20943 :param str ipsc_id: (required) 20944 The `OCID`__ of the IPSec connection. 20945 20946 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 20947 20948 :param str tunnel_id: (required) 20949 The `OCID`__ of the tunnel. 20950 20951 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 20952 20953 :param oci.core.models.UpdateTunnelCpeDeviceConfigDetails update_tunnel_cpe_device_config_details: (required) 20954 Request to input the tunnel's cpe configuration parameters 20955 20956 :param str if_match: (optional) 20957 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 20958 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 20959 will be updated or deleted only if the etag you provide matches the resource's current etag value. 20960 20961 :param str opc_retry_token: (optional) 20962 A token that uniquely identifies a request so it can be retried in case of a timeout or 20963 server error without risk of executing that same action again. Retry tokens expire after 24 20964 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 20965 has been deleted and purged from the system, then a retry of the original creation request 20966 may be rejected). 20967 20968 :param str opc_request_id: (optional) 20969 Unique identifier for the request. 20970 If you need to contact Oracle about a particular request, please provide the request ID. 20971 20972 :param obj retry_strategy: (optional) 20973 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 20974 20975 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. 20976 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 20977 20978 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 20979 20980 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.TunnelCpeDeviceConfig` 20981 :rtype: :class:`~oci.response.Response` 20982 20983 :example: 20984 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_tunnel_cpe_device_config.py.html>`__ to see an example of how to use update_tunnel_cpe_device_config API. 20985 """ 20986 resource_path = "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/tunnelDeviceConfig" 20987 method = "PUT" 20988 20989 # Don't accept unknown kwargs 20990 expected_kwargs = [ 20991 "retry_strategy", 20992 "if_match", 20993 "opc_retry_token", 20994 "opc_request_id" 20995 ] 20996 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 20997 if extra_kwargs: 20998 raise ValueError( 20999 "update_tunnel_cpe_device_config got unknown kwargs: {!r}".format(extra_kwargs)) 21000 21001 path_params = { 21002 "ipscId": ipsc_id, 21003 "tunnelId": tunnel_id 21004 } 21005 21006 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 21007 21008 for (k, v) in six.iteritems(path_params): 21009 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 21010 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 21011 21012 header_params = { 21013 "accept": "application/json", 21014 "content-type": "application/json", 21015 "if-match": kwargs.get("if_match", missing), 21016 "opc-retry-token": kwargs.get("opc_retry_token", missing), 21017 "opc-request-id": kwargs.get("opc_request_id", missing) 21018 } 21019 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 21020 21021 retry_strategy = self.base_client.get_preferred_retry_strategy( 21022 operation_retry_strategy=kwargs.get('retry_strategy'), 21023 client_retry_strategy=self.retry_strategy 21024 ) 21025 21026 if retry_strategy: 21027 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 21028 self.base_client.add_opc_retry_token_if_needed(header_params) 21029 self.base_client.add_opc_client_retries_header(header_params) 21030 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 21031 return retry_strategy.make_retrying_call( 21032 self.base_client.call_api, 21033 resource_path=resource_path, 21034 method=method, 21035 path_params=path_params, 21036 header_params=header_params, 21037 body=update_tunnel_cpe_device_config_details, 21038 response_type="TunnelCpeDeviceConfig") 21039 else: 21040 return self.base_client.call_api( 21041 resource_path=resource_path, 21042 method=method, 21043 path_params=path_params, 21044 header_params=header_params, 21045 body=update_tunnel_cpe_device_config_details, 21046 response_type="TunnelCpeDeviceConfig") 21047 21048 def update_vcn(self, vcn_id, update_vcn_details, **kwargs): 21049 """ 21050 Updates the specified VCN. 21051 21052 21053 :param str vcn_id: (required) 21054 The `OCID`__ of the VCN. 21055 21056 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 21057 21058 :param oci.core.models.UpdateVcnDetails update_vcn_details: (required) 21059 Details object for updating a VCN. 21060 21061 :param str if_match: (optional) 21062 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 21063 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 21064 will be updated or deleted only if the etag you provide matches the resource's current etag value. 21065 21066 :param obj retry_strategy: (optional) 21067 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 21068 21069 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. 21070 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 21071 21072 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 21073 21074 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vcn` 21075 :rtype: :class:`~oci.response.Response` 21076 21077 :example: 21078 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_vcn.py.html>`__ to see an example of how to use update_vcn API. 21079 """ 21080 resource_path = "/vcns/{vcnId}" 21081 method = "PUT" 21082 21083 # Don't accept unknown kwargs 21084 expected_kwargs = [ 21085 "retry_strategy", 21086 "if_match" 21087 ] 21088 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 21089 if extra_kwargs: 21090 raise ValueError( 21091 "update_vcn got unknown kwargs: {!r}".format(extra_kwargs)) 21092 21093 path_params = { 21094 "vcnId": vcn_id 21095 } 21096 21097 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 21098 21099 for (k, v) in six.iteritems(path_params): 21100 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 21101 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 21102 21103 header_params = { 21104 "accept": "application/json", 21105 "content-type": "application/json", 21106 "if-match": kwargs.get("if_match", missing) 21107 } 21108 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 21109 21110 retry_strategy = self.base_client.get_preferred_retry_strategy( 21111 operation_retry_strategy=kwargs.get('retry_strategy'), 21112 client_retry_strategy=self.retry_strategy 21113 ) 21114 21115 if retry_strategy: 21116 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 21117 self.base_client.add_opc_client_retries_header(header_params) 21118 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 21119 return retry_strategy.make_retrying_call( 21120 self.base_client.call_api, 21121 resource_path=resource_path, 21122 method=method, 21123 path_params=path_params, 21124 header_params=header_params, 21125 body=update_vcn_details, 21126 response_type="Vcn") 21127 else: 21128 return self.base_client.call_api( 21129 resource_path=resource_path, 21130 method=method, 21131 path_params=path_params, 21132 header_params=header_params, 21133 body=update_vcn_details, 21134 response_type="Vcn") 21135 21136 def update_virtual_circuit(self, virtual_circuit_id, update_virtual_circuit_details, **kwargs): 21137 """ 21138 Updates the specified virtual circuit. This can be called by 21139 either the customer who owns the virtual circuit, or the 21140 provider (when provisioning or de-provisioning the virtual 21141 circuit from their end). The documentation for 21142 :func:`update_virtual_circuit_details` 21143 indicates who can update each property of the virtual circuit. 21144 21145 **Important:** If the virtual circuit is working and in the 21146 PROVISIONED state, updating any of the network-related properties 21147 (such as the DRG being used, the BGP ASN, and so on) will cause the virtual 21148 circuit's state to switch to PROVISIONING and the related BGP 21149 session to go down. After Oracle re-provisions the virtual circuit, 21150 its state will return to PROVISIONED. Make sure you confirm that 21151 the associated BGP session is back up. For more information 21152 about the various states and how to test connectivity, see 21153 `FastConnect Overview`__. 21154 21155 To change the list of public IP prefixes for a public virtual circuit, 21156 use :func:`bulk_add_virtual_circuit_public_prefixes` 21157 and 21158 :func:`bulk_delete_virtual_circuit_public_prefixes`. 21159 Updating the list of prefixes does NOT cause the BGP session to go down. However, 21160 Oracle must verify the customer's ownership of each added prefix before 21161 traffic for that prefix will flow across the virtual circuit. 21162 21163 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm 21164 21165 21166 :param str virtual_circuit_id: (required) 21167 The `OCID`__ of the virtual circuit. 21168 21169 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 21170 21171 :param oci.core.models.UpdateVirtualCircuitDetails update_virtual_circuit_details: (required) 21172 Update VirtualCircuit fields. 21173 21174 :param str if_match: (optional) 21175 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 21176 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 21177 will be updated or deleted only if the etag you provide matches the resource's current etag value. 21178 21179 :param obj retry_strategy: (optional) 21180 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 21181 21182 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. 21183 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 21184 21185 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 21186 21187 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VirtualCircuit` 21188 :rtype: :class:`~oci.response.Response` 21189 21190 :example: 21191 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_virtual_circuit.py.html>`__ to see an example of how to use update_virtual_circuit API. 21192 """ 21193 resource_path = "/virtualCircuits/{virtualCircuitId}" 21194 method = "PUT" 21195 21196 # Don't accept unknown kwargs 21197 expected_kwargs = [ 21198 "retry_strategy", 21199 "if_match" 21200 ] 21201 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 21202 if extra_kwargs: 21203 raise ValueError( 21204 "update_virtual_circuit got unknown kwargs: {!r}".format(extra_kwargs)) 21205 21206 path_params = { 21207 "virtualCircuitId": virtual_circuit_id 21208 } 21209 21210 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 21211 21212 for (k, v) in six.iteritems(path_params): 21213 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 21214 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 21215 21216 header_params = { 21217 "accept": "application/json", 21218 "content-type": "application/json", 21219 "if-match": kwargs.get("if_match", missing) 21220 } 21221 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 21222 21223 retry_strategy = self.base_client.get_preferred_retry_strategy( 21224 operation_retry_strategy=kwargs.get('retry_strategy'), 21225 client_retry_strategy=self.retry_strategy 21226 ) 21227 21228 if retry_strategy: 21229 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 21230 self.base_client.add_opc_client_retries_header(header_params) 21231 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 21232 return retry_strategy.make_retrying_call( 21233 self.base_client.call_api, 21234 resource_path=resource_path, 21235 method=method, 21236 path_params=path_params, 21237 header_params=header_params, 21238 body=update_virtual_circuit_details, 21239 response_type="VirtualCircuit") 21240 else: 21241 return self.base_client.call_api( 21242 resource_path=resource_path, 21243 method=method, 21244 path_params=path_params, 21245 header_params=header_params, 21246 body=update_virtual_circuit_details, 21247 response_type="VirtualCircuit") 21248 21249 def update_vlan(self, vlan_id, update_vlan_details, **kwargs): 21250 """ 21251 Updates the specified VLAN. Note that this operation might require changes to all 21252 the VNICs in the VLAN, which can take a while. The VLAN will be in the UPDATING state until the changes are complete. 21253 21254 21255 :param str vlan_id: (required) 21256 The `OCID`__ of the VLAN. 21257 21258 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 21259 21260 :param oci.core.models.UpdateVlanDetails update_vlan_details: (required) 21261 Details object for updating a subnet. 21262 21263 :param str if_match: (optional) 21264 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 21265 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 21266 will be updated or deleted only if the etag you provide matches the resource's current etag value. 21267 21268 :param str opc_request_id: (optional) 21269 Unique identifier for the request. 21270 If you need to contact Oracle about a particular request, please provide the request ID. 21271 21272 :param obj retry_strategy: (optional) 21273 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 21274 21275 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. 21276 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 21277 21278 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 21279 21280 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vlan` 21281 :rtype: :class:`~oci.response.Response` 21282 21283 :example: 21284 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_vlan.py.html>`__ to see an example of how to use update_vlan API. 21285 """ 21286 resource_path = "/vlans/{vlanId}" 21287 method = "PUT" 21288 21289 # Don't accept unknown kwargs 21290 expected_kwargs = [ 21291 "retry_strategy", 21292 "if_match", 21293 "opc_request_id" 21294 ] 21295 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 21296 if extra_kwargs: 21297 raise ValueError( 21298 "update_vlan got unknown kwargs: {!r}".format(extra_kwargs)) 21299 21300 path_params = { 21301 "vlanId": vlan_id 21302 } 21303 21304 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 21305 21306 for (k, v) in six.iteritems(path_params): 21307 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 21308 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 21309 21310 header_params = { 21311 "accept": "application/json", 21312 "content-type": "application/json", 21313 "if-match": kwargs.get("if_match", missing), 21314 "opc-request-id": kwargs.get("opc_request_id", missing) 21315 } 21316 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 21317 21318 retry_strategy = self.base_client.get_preferred_retry_strategy( 21319 operation_retry_strategy=kwargs.get('retry_strategy'), 21320 client_retry_strategy=self.retry_strategy 21321 ) 21322 21323 if retry_strategy: 21324 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 21325 self.base_client.add_opc_client_retries_header(header_params) 21326 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 21327 return retry_strategy.make_retrying_call( 21328 self.base_client.call_api, 21329 resource_path=resource_path, 21330 method=method, 21331 path_params=path_params, 21332 header_params=header_params, 21333 body=update_vlan_details, 21334 response_type="Vlan") 21335 else: 21336 return self.base_client.call_api( 21337 resource_path=resource_path, 21338 method=method, 21339 path_params=path_params, 21340 header_params=header_params, 21341 body=update_vlan_details, 21342 response_type="Vlan") 21343 21344 def update_vnic(self, vnic_id, update_vnic_details, **kwargs): 21345 """ 21346 Updates the specified VNIC. 21347 21348 21349 :param str vnic_id: (required) 21350 The `OCID`__ of the VNIC. 21351 21352 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 21353 21354 :param oci.core.models.UpdateVnicDetails update_vnic_details: (required) 21355 Details object for updating a VNIC. 21356 21357 :param str if_match: (optional) 21358 For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 21359 parameter to the value of the etag from a previous GET or POST response for that resource. The resource 21360 will be updated or deleted only if the etag you provide matches the resource's current etag value. 21361 21362 :param obj retry_strategy: (optional) 21363 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 21364 21365 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. 21366 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 21367 21368 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 21369 21370 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vnic` 21371 :rtype: :class:`~oci.response.Response` 21372 21373 :example: 21374 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_vnic.py.html>`__ to see an example of how to use update_vnic API. 21375 """ 21376 resource_path = "/vnics/{vnicId}" 21377 method = "PUT" 21378 21379 # Don't accept unknown kwargs 21380 expected_kwargs = [ 21381 "retry_strategy", 21382 "if_match" 21383 ] 21384 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 21385 if extra_kwargs: 21386 raise ValueError( 21387 "update_vnic got unknown kwargs: {!r}".format(extra_kwargs)) 21388 21389 path_params = { 21390 "vnicId": vnic_id 21391 } 21392 21393 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 21394 21395 for (k, v) in six.iteritems(path_params): 21396 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 21397 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 21398 21399 header_params = { 21400 "accept": "application/json", 21401 "content-type": "application/json", 21402 "if-match": kwargs.get("if_match", missing) 21403 } 21404 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 21405 21406 retry_strategy = self.base_client.get_preferred_retry_strategy( 21407 operation_retry_strategy=kwargs.get('retry_strategy'), 21408 client_retry_strategy=self.retry_strategy 21409 ) 21410 21411 if retry_strategy: 21412 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 21413 self.base_client.add_opc_client_retries_header(header_params) 21414 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 21415 return retry_strategy.make_retrying_call( 21416 self.base_client.call_api, 21417 resource_path=resource_path, 21418 method=method, 21419 path_params=path_params, 21420 header_params=header_params, 21421 body=update_vnic_details, 21422 response_type="Vnic") 21423 else: 21424 return self.base_client.call_api( 21425 resource_path=resource_path, 21426 method=method, 21427 path_params=path_params, 21428 header_params=header_params, 21429 body=update_vnic_details, 21430 response_type="Vnic") 21431 21432 def upgrade_drg(self, drg_id, **kwargs): 21433 """ 21434 Upgrades the DRG. After upgrade, you can control routing inside your DRG 21435 via DRG attachments, route distributions, and DRG route tables. 21436 21437 21438 :param str drg_id: (required) 21439 The `OCID`__ of the DRG. 21440 21441 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 21442 21443 :param str opc_request_id: (optional) 21444 Unique identifier for the request. 21445 If you need to contact Oracle about a particular request, please provide the request ID. 21446 21447 :param str opc_retry_token: (optional) 21448 A token that uniquely identifies a request so it can be retried in case of a timeout or 21449 server error without risk of executing that same action again. Retry tokens expire after 24 21450 hours, but can be invalidated before then due to conflicting operations (for example, if a resource 21451 has been deleted and purged from the system, then a retry of the original creation request 21452 may be rejected). 21453 21454 :param obj retry_strategy: (optional) 21455 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 21456 21457 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. 21458 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 21459 21460 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 21461 21462 :return: A :class:`~oci.response.Response` object with data of type None 21463 :rtype: :class:`~oci.response.Response` 21464 21465 :example: 21466 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/upgrade_drg.py.html>`__ to see an example of how to use upgrade_drg API. 21467 """ 21468 resource_path = "/drgs/{drgId}/actions/upgrade" 21469 method = "POST" 21470 21471 # Don't accept unknown kwargs 21472 expected_kwargs = [ 21473 "retry_strategy", 21474 "opc_request_id", 21475 "opc_retry_token" 21476 ] 21477 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 21478 if extra_kwargs: 21479 raise ValueError( 21480 "upgrade_drg got unknown kwargs: {!r}".format(extra_kwargs)) 21481 21482 path_params = { 21483 "drgId": drg_id 21484 } 21485 21486 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 21487 21488 for (k, v) in six.iteritems(path_params): 21489 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 21490 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 21491 21492 header_params = { 21493 "accept": "application/json", 21494 "content-type": "application/json", 21495 "opc-request-id": kwargs.get("opc_request_id", missing), 21496 "opc-retry-token": kwargs.get("opc_retry_token", missing) 21497 } 21498 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 21499 21500 retry_strategy = self.base_client.get_preferred_retry_strategy( 21501 operation_retry_strategy=kwargs.get('retry_strategy'), 21502 client_retry_strategy=self.retry_strategy 21503 ) 21504 21505 if retry_strategy: 21506 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 21507 self.base_client.add_opc_retry_token_if_needed(header_params) 21508 self.base_client.add_opc_client_retries_header(header_params) 21509 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 21510 return retry_strategy.make_retrying_call( 21511 self.base_client.call_api, 21512 resource_path=resource_path, 21513 method=method, 21514 path_params=path_params, 21515 header_params=header_params) 21516 else: 21517 return self.base_client.call_api( 21518 resource_path=resource_path, 21519 method=method, 21520 path_params=path_params, 21521 header_params=header_params) 21522 21523 def validate_byoip_range(self, byoip_range_id, **kwargs): 21524 """ 21525 Submits the BYOIP CIDR block you are importing for validation. Do not submit to Oracle for validation if you have not already 21526 modified the information for the BYOIP CIDR block with your Regional Internet Registry. See `To import a CIDR block`__ for details. 21527 21528 __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/BYOIP.htm#import_cidr 21529 21530 21531 :param str byoip_range_id: (required) 21532 The `OCID`__ of the `ByoipRange` resource containing the BYOIP CIDR block. 21533 21534 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 21535 21536 :param str opc_request_id: (optional) 21537 Unique identifier for the request. 21538 If you need to contact Oracle about a particular request, please provide the request ID. 21539 21540 :param obj retry_strategy: (optional) 21541 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 21542 21543 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. 21544 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 21545 21546 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 21547 21548 :return: A :class:`~oci.response.Response` object with data of type None 21549 :rtype: :class:`~oci.response.Response` 21550 21551 :example: 21552 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/validate_byoip_range.py.html>`__ to see an example of how to use validate_byoip_range API. 21553 """ 21554 resource_path = "/byoipRanges/{byoipRangeId}/actions/validate" 21555 method = "POST" 21556 21557 # Don't accept unknown kwargs 21558 expected_kwargs = [ 21559 "retry_strategy", 21560 "opc_request_id" 21561 ] 21562 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 21563 if extra_kwargs: 21564 raise ValueError( 21565 "validate_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) 21566 21567 path_params = { 21568 "byoipRangeId": byoip_range_id 21569 } 21570 21571 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 21572 21573 for (k, v) in six.iteritems(path_params): 21574 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 21575 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 21576 21577 header_params = { 21578 "accept": "application/json", 21579 "content-type": "application/json", 21580 "opc-request-id": kwargs.get("opc_request_id", missing) 21581 } 21582 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 21583 21584 retry_strategy = self.base_client.get_preferred_retry_strategy( 21585 operation_retry_strategy=kwargs.get('retry_strategy'), 21586 client_retry_strategy=self.retry_strategy 21587 ) 21588 21589 if retry_strategy: 21590 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 21591 self.base_client.add_opc_client_retries_header(header_params) 21592 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 21593 return retry_strategy.make_retrying_call( 21594 self.base_client.call_api, 21595 resource_path=resource_path, 21596 method=method, 21597 path_params=path_params, 21598 header_params=header_params) 21599 else: 21600 return self.base_client.call_api( 21601 resource_path=resource_path, 21602 method=method, 21603 path_params=path_params, 21604 header_params=header_params) 21605 21606 def withdraw_byoip_range(self, byoip_range_id, **kwargs): 21607 """ 21608 Withdraws BGP route advertisement for the BYOIP CIDR block. 21609 21610 21611 :param str byoip_range_id: (required) 21612 The `OCID`__ of the `ByoipRange` resource containing the BYOIP CIDR block. 21613 21614 __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm 21615 21616 :param str opc_request_id: (optional) 21617 Unique identifier for the request. 21618 If you need to contact Oracle about a particular request, please provide the request ID. 21619 21620 :param obj retry_strategy: (optional) 21621 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 21622 21623 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. 21624 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 21625 21626 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 21627 21628 :return: A :class:`~oci.response.Response` object with data of type None 21629 :rtype: :class:`~oci.response.Response` 21630 21631 :example: 21632 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/withdraw_byoip_range.py.html>`__ to see an example of how to use withdraw_byoip_range API. 21633 """ 21634 resource_path = "/byoipRanges/{byoipRangeId}/actions/withdraw" 21635 method = "POST" 21636 21637 # Don't accept unknown kwargs 21638 expected_kwargs = [ 21639 "retry_strategy", 21640 "opc_request_id" 21641 ] 21642 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 21643 if extra_kwargs: 21644 raise ValueError( 21645 "withdraw_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) 21646 21647 path_params = { 21648 "byoipRangeId": byoip_range_id 21649 } 21650 21651 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 21652 21653 for (k, v) in six.iteritems(path_params): 21654 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 21655 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 21656 21657 header_params = { 21658 "accept": "application/json", 21659 "content-type": "application/json", 21660 "opc-request-id": kwargs.get("opc_request_id", missing) 21661 } 21662 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 21663 21664 retry_strategy = self.base_client.get_preferred_retry_strategy( 21665 operation_retry_strategy=kwargs.get('retry_strategy'), 21666 client_retry_strategy=self.retry_strategy 21667 ) 21668 21669 if retry_strategy: 21670 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 21671 self.base_client.add_opc_client_retries_header(header_params) 21672 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 21673 return retry_strategy.make_retrying_call( 21674 self.base_client.call_api, 21675 resource_path=resource_path, 21676 method=method, 21677 path_params=path_params, 21678 header_params=header_params) 21679 else: 21680 return self.base_client.call_api( 21681 resource_path=resource_path, 21682 method=method, 21683 path_params=path_params, 21684 header_params=header_params) 21685