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 data_catalog_type_mapping 16missing = Sentinel("Missing") 17 18 19class DataCatalogClient(object): 20 """ 21 Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. 22 For more information, see [Data Catalog](https://docs.oracle.com/iaas/data-catalog/home.htm). 23 """ 24 25 def __init__(self, config, **kwargs): 26 """ 27 Creates a new service client 28 29 :param dict config: 30 Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__. 31 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 32 the dict using :py:meth:`~oci.config.validate_config` 33 34 :param str service_endpoint: (optional) 35 The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is 36 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 37 need to specify a service endpoint. 38 39 :param timeout: (optional) 40 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 41 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 42 a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout. 43 :type timeout: float or tuple(float, float) 44 45 :param signer: (optional) 46 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 47 provided in the config parameter. 48 49 One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__ 50 by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument 51 :type signer: :py:class:`~oci.signer.AbstractBaseSigner` 52 53 :param obj retry_strategy: (optional) 54 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. 55 Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation. 56 Any value provided at the operation level will override whatever is specified at the client level. 57 58 This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` 59 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>`__. 60 61 :param obj circuit_breaker_strategy: (optional) 62 A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). 63 This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided. 64 The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__. 65 66 :param function circuit_breaker_callback: (optional) 67 Callback function to receive any exceptions triggerred by the circuit breaker. 68 """ 69 validate_config(config, signer=kwargs.get('signer')) 70 if 'signer' in kwargs: 71 signer = kwargs['signer'] 72 73 elif AUTHENTICATION_TYPE_FIELD_NAME in config: 74 signer = get_signer_from_authentication_type(config) 75 76 else: 77 signer = Signer( 78 tenancy=config["tenancy"], 79 user=config["user"], 80 fingerprint=config["fingerprint"], 81 private_key_file_location=config.get("key_file"), 82 pass_phrase=get_config_value_or_default(config, "pass_phrase"), 83 private_key_content=config.get("key_content") 84 ) 85 86 base_client_init_kwargs = { 87 'regional_client': True, 88 'service_endpoint': kwargs.get('service_endpoint'), 89 'base_path': '/20190325', 90 'service_endpoint_template': 'https://datacatalog.{region}.oci.{secondLevelDomain}', 91 'skip_deserialization': kwargs.get('skip_deserialization', False), 92 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) 93 } 94 if 'timeout' in kwargs: 95 base_client_init_kwargs['timeout'] = kwargs.get('timeout') 96 if base_client_init_kwargs.get('circuit_breaker_strategy') is None: 97 base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY 98 self.base_client = BaseClient("data_catalog", config, signer, data_catalog_type_mapping, **base_client_init_kwargs) 99 self.retry_strategy = kwargs.get('retry_strategy') 100 self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') 101 102 def add_data_selector_patterns(self, catalog_id, data_asset_key, data_selector_pattern_details, **kwargs): 103 """ 104 Add data selector pattern to the data asset. 105 106 107 :param str catalog_id: (required) 108 Unique catalog identifier. 109 110 :param str data_asset_key: (required) 111 Unique data asset key. 112 113 :param oci.data_catalog.models.DataSelectorPatternDetails data_selector_pattern_details: (required) 114 The information used to add the patterns for deriving logical entities. 115 116 :param str opc_request_id: (optional) 117 The client request ID for tracing. 118 119 :param str if_match: (optional) 120 For optimistic concurrency control. In the PUT or DELETE call 121 for a resource, set the `if-match` parameter to the value of the 122 etag from a previous GET or POST response for that resource. 123 The resource will be updated or deleted only if the etag you 124 provide matches the resource's current etag value. 125 126 :param str opc_retry_token: (optional) 127 A token that uniquely identifies a request so it can be retried in case of a timeout or 128 server error without risk of executing that same action again. Retry tokens expire after 24 129 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 130 has been deleted and purged from the system, then a retry of the original creation request 131 might be rejected. 132 133 :param obj retry_strategy: (optional) 134 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 135 136 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 137 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 138 139 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 140 141 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.DataAsset` 142 :rtype: :class:`~oci.response.Response` 143 144 :example: 145 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/add_data_selector_patterns.py.html>`__ to see an example of how to use add_data_selector_patterns API. 146 """ 147 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/actions/addDataSelectorPatterns" 148 method = "POST" 149 150 # Don't accept unknown kwargs 151 expected_kwargs = [ 152 "retry_strategy", 153 "opc_request_id", 154 "if_match", 155 "opc_retry_token" 156 ] 157 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 158 if extra_kwargs: 159 raise ValueError( 160 "add_data_selector_patterns got unknown kwargs: {!r}".format(extra_kwargs)) 161 162 path_params = { 163 "catalogId": catalog_id, 164 "dataAssetKey": data_asset_key 165 } 166 167 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 168 169 for (k, v) in six.iteritems(path_params): 170 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 171 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 172 173 header_params = { 174 "accept": "application/json", 175 "content-type": "application/json", 176 "opc-request-id": kwargs.get("opc_request_id", missing), 177 "if-match": kwargs.get("if_match", missing), 178 "opc-retry-token": kwargs.get("opc_retry_token", missing) 179 } 180 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 181 182 retry_strategy = self.base_client.get_preferred_retry_strategy( 183 operation_retry_strategy=kwargs.get('retry_strategy'), 184 client_retry_strategy=self.retry_strategy 185 ) 186 187 if retry_strategy: 188 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 189 self.base_client.add_opc_retry_token_if_needed(header_params) 190 self.base_client.add_opc_client_retries_header(header_params) 191 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 192 return retry_strategy.make_retrying_call( 193 self.base_client.call_api, 194 resource_path=resource_path, 195 method=method, 196 path_params=path_params, 197 header_params=header_params, 198 body=data_selector_pattern_details, 199 response_type="DataAsset") 200 else: 201 return self.base_client.call_api( 202 resource_path=resource_path, 203 method=method, 204 path_params=path_params, 205 header_params=header_params, 206 body=data_selector_pattern_details, 207 response_type="DataAsset") 208 209 def associate_custom_property(self, catalog_id, type_key, associate_custom_property_details, **kwargs): 210 """ 211 Associate the custom property for the given type 212 213 214 :param str catalog_id: (required) 215 Unique catalog identifier. 216 217 :param str type_key: (required) 218 Unique type key. 219 220 :param oci.data_catalog.models.TypeCustomPropertyDetails associate_custom_property_details: (required) 221 The information used to associate the custom property for the type. 222 223 :param str opc_request_id: (optional) 224 The client request ID for tracing. 225 226 :param str if_match: (optional) 227 For optimistic concurrency control. In the PUT or DELETE call 228 for a resource, set the `if-match` parameter to the value of the 229 etag from a previous GET or POST response for that resource. 230 The resource will be updated or deleted only if the etag you 231 provide matches the resource's current etag value. 232 233 :param str opc_retry_token: (optional) 234 A token that uniquely identifies a request so it can be retried in case of a timeout or 235 server error without risk of executing that same action again. Retry tokens expire after 24 236 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 237 has been deleted and purged from the system, then a retry of the original creation request 238 might be rejected. 239 240 :param obj retry_strategy: (optional) 241 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 242 243 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 244 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 245 246 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 247 248 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Type` 249 :rtype: :class:`~oci.response.Response` 250 251 :example: 252 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/associate_custom_property.py.html>`__ to see an example of how to use associate_custom_property API. 253 """ 254 resource_path = "/catalogs/{catalogId}/types/{typeKey}/actions/associateCustomProperties" 255 method = "POST" 256 257 # Don't accept unknown kwargs 258 expected_kwargs = [ 259 "retry_strategy", 260 "opc_request_id", 261 "if_match", 262 "opc_retry_token" 263 ] 264 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 265 if extra_kwargs: 266 raise ValueError( 267 "associate_custom_property got unknown kwargs: {!r}".format(extra_kwargs)) 268 269 path_params = { 270 "catalogId": catalog_id, 271 "typeKey": type_key 272 } 273 274 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 275 276 for (k, v) in six.iteritems(path_params): 277 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 278 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 279 280 header_params = { 281 "accept": "application/json", 282 "content-type": "application/json", 283 "opc-request-id": kwargs.get("opc_request_id", missing), 284 "if-match": kwargs.get("if_match", missing), 285 "opc-retry-token": kwargs.get("opc_retry_token", missing) 286 } 287 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 288 289 retry_strategy = self.base_client.get_preferred_retry_strategy( 290 operation_retry_strategy=kwargs.get('retry_strategy'), 291 client_retry_strategy=self.retry_strategy 292 ) 293 294 if retry_strategy: 295 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 296 self.base_client.add_opc_retry_token_if_needed(header_params) 297 self.base_client.add_opc_client_retries_header(header_params) 298 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 299 return retry_strategy.make_retrying_call( 300 self.base_client.call_api, 301 resource_path=resource_path, 302 method=method, 303 path_params=path_params, 304 header_params=header_params, 305 body=associate_custom_property_details, 306 response_type="Type") 307 else: 308 return self.base_client.call_api( 309 resource_path=resource_path, 310 method=method, 311 path_params=path_params, 312 header_params=header_params, 313 body=associate_custom_property_details, 314 response_type="Type") 315 316 def attach_catalog_private_endpoint(self, attach_catalog_private_endpoint_details, catalog_id, **kwargs): 317 """ 318 Attaches a private reverse connection endpoint resource to a data catalog resource. When provided, 'If-Match' is checked against 'ETag' values of the resource. 319 320 321 :param oci.data_catalog.models.AttachCatalogPrivateEndpointDetails attach_catalog_private_endpoint_details: (required) 322 Details for private reverse connection endpoint to be used for attachment. 323 324 :param str catalog_id: (required) 325 Unique catalog identifier. 326 327 :param str if_match: (optional) 328 For optimistic concurrency control. In the PUT or DELETE call 329 for a resource, set the `if-match` parameter to the value of the 330 etag from a previous GET or POST response for that resource. 331 The resource will be updated or deleted only if the etag you 332 provide matches the resource's current etag value. 333 334 :param str opc_request_id: (optional) 335 The client request ID for tracing. 336 337 :param str opc_retry_token: (optional) 338 A token that uniquely identifies a request so it can be retried in case of a timeout or 339 server error without risk of executing that same action again. Retry tokens expire after 24 340 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 341 has been deleted and purged from the system, then a retry of the original creation request 342 might be rejected. 343 344 :param obj retry_strategy: (optional) 345 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 346 347 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 348 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 349 350 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 351 352 :return: A :class:`~oci.response.Response` object with data of type None 353 :rtype: :class:`~oci.response.Response` 354 355 :example: 356 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/attach_catalog_private_endpoint.py.html>`__ to see an example of how to use attach_catalog_private_endpoint API. 357 """ 358 resource_path = "/catalogs/{catalogId}/actions/attachCatalogPrivateEndpoint" 359 method = "POST" 360 361 # Don't accept unknown kwargs 362 expected_kwargs = [ 363 "retry_strategy", 364 "if_match", 365 "opc_request_id", 366 "opc_retry_token" 367 ] 368 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 369 if extra_kwargs: 370 raise ValueError( 371 "attach_catalog_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) 372 373 path_params = { 374 "catalogId": catalog_id 375 } 376 377 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 378 379 for (k, v) in six.iteritems(path_params): 380 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 381 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 382 383 header_params = { 384 "accept": "application/json", 385 "content-type": "application/json", 386 "if-match": kwargs.get("if_match", missing), 387 "opc-request-id": kwargs.get("opc_request_id", missing), 388 "opc-retry-token": kwargs.get("opc_retry_token", missing) 389 } 390 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 391 392 retry_strategy = self.base_client.get_preferred_retry_strategy( 393 operation_retry_strategy=kwargs.get('retry_strategy'), 394 client_retry_strategy=self.retry_strategy 395 ) 396 397 if retry_strategy: 398 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 399 self.base_client.add_opc_retry_token_if_needed(header_params) 400 self.base_client.add_opc_client_retries_header(header_params) 401 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 402 return retry_strategy.make_retrying_call( 403 self.base_client.call_api, 404 resource_path=resource_path, 405 method=method, 406 path_params=path_params, 407 header_params=header_params, 408 body=attach_catalog_private_endpoint_details) 409 else: 410 return self.base_client.call_api( 411 resource_path=resource_path, 412 method=method, 413 path_params=path_params, 414 header_params=header_params, 415 body=attach_catalog_private_endpoint_details) 416 417 def change_catalog_compartment(self, change_catalog_compartment_details, catalog_id, **kwargs): 418 """ 419 Moves a resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. 420 421 422 :param oci.data_catalog.models.ChangeCatalogCompartmentDetails change_catalog_compartment_details: (required) 423 Details for the target compartment. 424 425 :param str catalog_id: (required) 426 Unique catalog identifier. 427 428 :param str if_match: (optional) 429 For optimistic concurrency control. In the PUT or DELETE call 430 for a resource, set the `if-match` parameter to the value of the 431 etag from a previous GET or POST response for that resource. 432 The resource will be updated or deleted only if the etag you 433 provide matches the resource's current etag value. 434 435 :param str opc_request_id: (optional) 436 The client request ID for tracing. 437 438 :param obj retry_strategy: (optional) 439 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 440 441 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 442 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 443 444 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 445 446 :return: A :class:`~oci.response.Response` object with data of type None 447 :rtype: :class:`~oci.response.Response` 448 449 :example: 450 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/change_catalog_compartment.py.html>`__ to see an example of how to use change_catalog_compartment API. 451 """ 452 resource_path = "/catalogs/{catalogId}/actions/changeCompartment" 453 method = "POST" 454 455 # Don't accept unknown kwargs 456 expected_kwargs = [ 457 "retry_strategy", 458 "if_match", 459 "opc_request_id" 460 ] 461 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 462 if extra_kwargs: 463 raise ValueError( 464 "change_catalog_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 465 466 path_params = { 467 "catalogId": catalog_id 468 } 469 470 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 471 472 for (k, v) in six.iteritems(path_params): 473 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 474 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 475 476 header_params = { 477 "accept": "application/json", 478 "content-type": "application/json", 479 "if-match": kwargs.get("if_match", missing), 480 "opc-request-id": kwargs.get("opc_request_id", missing) 481 } 482 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 483 484 retry_strategy = self.base_client.get_preferred_retry_strategy( 485 operation_retry_strategy=kwargs.get('retry_strategy'), 486 client_retry_strategy=self.retry_strategy 487 ) 488 489 if retry_strategy: 490 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 491 self.base_client.add_opc_client_retries_header(header_params) 492 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 493 return retry_strategy.make_retrying_call( 494 self.base_client.call_api, 495 resource_path=resource_path, 496 method=method, 497 path_params=path_params, 498 header_params=header_params, 499 body=change_catalog_compartment_details) 500 else: 501 return self.base_client.call_api( 502 resource_path=resource_path, 503 method=method, 504 path_params=path_params, 505 header_params=header_params, 506 body=change_catalog_compartment_details) 507 508 def change_catalog_private_endpoint_compartment(self, change_catalog_private_endpoint_compartment_details, catalog_private_endpoint_id, **kwargs): 509 """ 510 Moves a resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. 511 512 513 :param oci.data_catalog.models.ChangeCatalogPrivateEndpointCompartmentDetails change_catalog_private_endpoint_compartment_details: (required) 514 Details for the target compartment. 515 516 :param str catalog_private_endpoint_id: (required) 517 Unique private reverse connection identifier. 518 519 :param str if_match: (optional) 520 For optimistic concurrency control. In the PUT or DELETE call 521 for a resource, set the `if-match` parameter to the value of the 522 etag from a previous GET or POST response for that resource. 523 The resource will be updated or deleted only if the etag you 524 provide matches the resource's current etag value. 525 526 :param str opc_request_id: (optional) 527 The client request ID for tracing. 528 529 :param obj retry_strategy: (optional) 530 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 531 532 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 533 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 534 535 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 536 537 :return: A :class:`~oci.response.Response` object with data of type None 538 :rtype: :class:`~oci.response.Response` 539 540 :example: 541 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/change_catalog_private_endpoint_compartment.py.html>`__ to see an example of how to use change_catalog_private_endpoint_compartment API. 542 """ 543 resource_path = "/catalogPrivateEndpoints/{catalogPrivateEndpointId}/actions/changeCompartment" 544 method = "POST" 545 546 # Don't accept unknown kwargs 547 expected_kwargs = [ 548 "retry_strategy", 549 "if_match", 550 "opc_request_id" 551 ] 552 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 553 if extra_kwargs: 554 raise ValueError( 555 "change_catalog_private_endpoint_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 556 557 path_params = { 558 "catalogPrivateEndpointId": catalog_private_endpoint_id 559 } 560 561 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 562 563 for (k, v) in six.iteritems(path_params): 564 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 565 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 566 567 header_params = { 568 "accept": "application/json", 569 "content-type": "application/json", 570 "if-match": kwargs.get("if_match", missing), 571 "opc-request-id": kwargs.get("opc_request_id", missing) 572 } 573 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 574 575 retry_strategy = self.base_client.get_preferred_retry_strategy( 576 operation_retry_strategy=kwargs.get('retry_strategy'), 577 client_retry_strategy=self.retry_strategy 578 ) 579 580 if retry_strategy: 581 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 582 self.base_client.add_opc_client_retries_header(header_params) 583 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 584 return retry_strategy.make_retrying_call( 585 self.base_client.call_api, 586 resource_path=resource_path, 587 method=method, 588 path_params=path_params, 589 header_params=header_params, 590 body=change_catalog_private_endpoint_compartment_details) 591 else: 592 return self.base_client.call_api( 593 resource_path=resource_path, 594 method=method, 595 path_params=path_params, 596 header_params=header_params, 597 body=change_catalog_private_endpoint_compartment_details) 598 599 def change_metastore_compartment(self, change_metastore_compartment_details, metastore_id, **kwargs): 600 """ 601 Moves a resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. 602 603 604 :param oci.data_catalog.models.ChangeMetastoreCompartmentDetails change_metastore_compartment_details: (required) 605 Information about a change in metastore compartment. 606 607 :param str metastore_id: (required) 608 The metastore's OCID. 609 610 :param str if_match: (optional) 611 For optimistic concurrency control. In the PUT or DELETE call 612 for a resource, set the `if-match` parameter to the value of the 613 etag from a previous GET or POST response for that resource. 614 The resource will be updated or deleted only if the etag you 615 provide matches the resource's current etag value. 616 617 :param str opc_request_id: (optional) 618 The client request ID for tracing. 619 620 :param obj retry_strategy: (optional) 621 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 622 623 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 624 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 625 626 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 627 628 :return: A :class:`~oci.response.Response` object with data of type None 629 :rtype: :class:`~oci.response.Response` 630 631 :example: 632 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/change_metastore_compartment.py.html>`__ to see an example of how to use change_metastore_compartment API. 633 """ 634 resource_path = "/metastores/{metastoreId}/actions/changeCompartment" 635 method = "POST" 636 637 # Don't accept unknown kwargs 638 expected_kwargs = [ 639 "retry_strategy", 640 "if_match", 641 "opc_request_id" 642 ] 643 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 644 if extra_kwargs: 645 raise ValueError( 646 "change_metastore_compartment got unknown kwargs: {!r}".format(extra_kwargs)) 647 648 path_params = { 649 "metastoreId": metastore_id 650 } 651 652 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 653 654 for (k, v) in six.iteritems(path_params): 655 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 656 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 657 658 header_params = { 659 "accept": "application/json", 660 "content-type": "application/json", 661 "if-match": kwargs.get("if_match", missing), 662 "opc-request-id": kwargs.get("opc_request_id", missing) 663 } 664 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 665 666 retry_strategy = self.base_client.get_preferred_retry_strategy( 667 operation_retry_strategy=kwargs.get('retry_strategy'), 668 client_retry_strategy=self.retry_strategy 669 ) 670 671 if retry_strategy: 672 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 673 self.base_client.add_opc_client_retries_header(header_params) 674 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 675 return retry_strategy.make_retrying_call( 676 self.base_client.call_api, 677 resource_path=resource_path, 678 method=method, 679 path_params=path_params, 680 header_params=header_params, 681 body=change_metastore_compartment_details) 682 else: 683 return self.base_client.call_api( 684 resource_path=resource_path, 685 method=method, 686 path_params=path_params, 687 header_params=header_params, 688 body=change_metastore_compartment_details) 689 690 def create_attribute(self, catalog_id, data_asset_key, entity_key, create_attribute_details, **kwargs): 691 """ 692 Creates a new entity attribute. 693 694 695 :param str catalog_id: (required) 696 Unique catalog identifier. 697 698 :param str data_asset_key: (required) 699 Unique data asset key. 700 701 :param str entity_key: (required) 702 Unique entity key. 703 704 :param oci.data_catalog.models.CreateAttributeDetails create_attribute_details: (required) 705 The information used to create an entity attribute. 706 707 :param str opc_request_id: (optional) 708 The client request ID for tracing. 709 710 :param str opc_retry_token: (optional) 711 A token that uniquely identifies a request so it can be retried in case of a timeout or 712 server error without risk of executing that same action again. Retry tokens expire after 24 713 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 714 has been deleted and purged from the system, then a retry of the original creation request 715 might be rejected. 716 717 :param obj retry_strategy: (optional) 718 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 719 720 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 721 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 722 723 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 724 725 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Attribute` 726 :rtype: :class:`~oci.response.Response` 727 728 :example: 729 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_attribute.py.html>`__ to see an example of how to use create_attribute API. 730 """ 731 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/attributes" 732 method = "POST" 733 734 # Don't accept unknown kwargs 735 expected_kwargs = [ 736 "retry_strategy", 737 "opc_request_id", 738 "opc_retry_token" 739 ] 740 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 741 if extra_kwargs: 742 raise ValueError( 743 "create_attribute got unknown kwargs: {!r}".format(extra_kwargs)) 744 745 path_params = { 746 "catalogId": catalog_id, 747 "dataAssetKey": data_asset_key, 748 "entityKey": entity_key 749 } 750 751 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 752 753 for (k, v) in six.iteritems(path_params): 754 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 755 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 756 757 header_params = { 758 "accept": "application/json", 759 "content-type": "application/json", 760 "opc-request-id": kwargs.get("opc_request_id", missing), 761 "opc-retry-token": kwargs.get("opc_retry_token", missing) 762 } 763 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 764 765 retry_strategy = self.base_client.get_preferred_retry_strategy( 766 operation_retry_strategy=kwargs.get('retry_strategy'), 767 client_retry_strategy=self.retry_strategy 768 ) 769 770 if retry_strategy: 771 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 772 self.base_client.add_opc_retry_token_if_needed(header_params) 773 self.base_client.add_opc_client_retries_header(header_params) 774 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 775 return retry_strategy.make_retrying_call( 776 self.base_client.call_api, 777 resource_path=resource_path, 778 method=method, 779 path_params=path_params, 780 header_params=header_params, 781 body=create_attribute_details, 782 response_type="Attribute") 783 else: 784 return self.base_client.call_api( 785 resource_path=resource_path, 786 method=method, 787 path_params=path_params, 788 header_params=header_params, 789 body=create_attribute_details, 790 response_type="Attribute") 791 792 def create_attribute_tag(self, catalog_id, data_asset_key, entity_key, attribute_key, create_attribute_tag_details, **kwargs): 793 """ 794 Creates a new entity attribute tag. 795 796 797 :param str catalog_id: (required) 798 Unique catalog identifier. 799 800 :param str data_asset_key: (required) 801 Unique data asset key. 802 803 :param str entity_key: (required) 804 Unique entity key. 805 806 :param str attribute_key: (required) 807 Unique attribute key. 808 809 :param oci.data_catalog.models.CreateTagDetails create_attribute_tag_details: (required) 810 The information used to create an entity attribute tag. 811 812 :param str opc_request_id: (optional) 813 The client request ID for tracing. 814 815 :param str opc_retry_token: (optional) 816 A token that uniquely identifies a request so it can be retried in case of a timeout or 817 server error without risk of executing that same action again. Retry tokens expire after 24 818 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 819 has been deleted and purged from the system, then a retry of the original creation request 820 might be rejected. 821 822 :param obj retry_strategy: (optional) 823 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 824 825 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 826 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 827 828 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 829 830 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.AttributeTag` 831 :rtype: :class:`~oci.response.Response` 832 833 :example: 834 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_attribute_tag.py.html>`__ to see an example of how to use create_attribute_tag API. 835 """ 836 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/attributes/{attributeKey}/tags" 837 method = "POST" 838 839 # Don't accept unknown kwargs 840 expected_kwargs = [ 841 "retry_strategy", 842 "opc_request_id", 843 "opc_retry_token" 844 ] 845 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 846 if extra_kwargs: 847 raise ValueError( 848 "create_attribute_tag got unknown kwargs: {!r}".format(extra_kwargs)) 849 850 path_params = { 851 "catalogId": catalog_id, 852 "dataAssetKey": data_asset_key, 853 "entityKey": entity_key, 854 "attributeKey": attribute_key 855 } 856 857 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 858 859 for (k, v) in six.iteritems(path_params): 860 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 861 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 862 863 header_params = { 864 "accept": "application/json", 865 "content-type": "application/json", 866 "opc-request-id": kwargs.get("opc_request_id", missing), 867 "opc-retry-token": kwargs.get("opc_retry_token", missing) 868 } 869 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 870 871 retry_strategy = self.base_client.get_preferred_retry_strategy( 872 operation_retry_strategy=kwargs.get('retry_strategy'), 873 client_retry_strategy=self.retry_strategy 874 ) 875 876 if retry_strategy: 877 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 878 self.base_client.add_opc_retry_token_if_needed(header_params) 879 self.base_client.add_opc_client_retries_header(header_params) 880 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 881 return retry_strategy.make_retrying_call( 882 self.base_client.call_api, 883 resource_path=resource_path, 884 method=method, 885 path_params=path_params, 886 header_params=header_params, 887 body=create_attribute_tag_details, 888 response_type="AttributeTag") 889 else: 890 return self.base_client.call_api( 891 resource_path=resource_path, 892 method=method, 893 path_params=path_params, 894 header_params=header_params, 895 body=create_attribute_tag_details, 896 response_type="AttributeTag") 897 898 def create_catalog(self, create_catalog_details, **kwargs): 899 """ 900 Creates a new data catalog instance that includes a console and an API URL for managing metadata operations. 901 For more information, please see the documentation. 902 903 904 :param oci.data_catalog.models.CreateCatalogDetails create_catalog_details: (required) 905 Details for the new data catalog. 906 907 :param str opc_retry_token: (optional) 908 A token that uniquely identifies a request so it can be retried in case of a timeout or 909 server error without risk of executing that same action again. Retry tokens expire after 24 910 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 911 has been deleted and purged from the system, then a retry of the original creation request 912 might be rejected. 913 914 :param str opc_request_id: (optional) 915 The client request ID for tracing. 916 917 :param obj retry_strategy: (optional) 918 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 919 920 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 921 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 922 923 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 924 925 :return: A :class:`~oci.response.Response` object with data of type None 926 :rtype: :class:`~oci.response.Response` 927 928 :example: 929 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_catalog.py.html>`__ to see an example of how to use create_catalog API. 930 """ 931 resource_path = "/catalogs" 932 method = "POST" 933 934 # Don't accept unknown kwargs 935 expected_kwargs = [ 936 "retry_strategy", 937 "opc_retry_token", 938 "opc_request_id" 939 ] 940 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 941 if extra_kwargs: 942 raise ValueError( 943 "create_catalog got unknown kwargs: {!r}".format(extra_kwargs)) 944 945 header_params = { 946 "accept": "application/json", 947 "content-type": "application/json", 948 "opc-retry-token": kwargs.get("opc_retry_token", missing), 949 "opc-request-id": kwargs.get("opc_request_id", missing) 950 } 951 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 952 953 retry_strategy = self.base_client.get_preferred_retry_strategy( 954 operation_retry_strategy=kwargs.get('retry_strategy'), 955 client_retry_strategy=self.retry_strategy 956 ) 957 958 if retry_strategy: 959 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 960 self.base_client.add_opc_retry_token_if_needed(header_params) 961 self.base_client.add_opc_client_retries_header(header_params) 962 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 963 return retry_strategy.make_retrying_call( 964 self.base_client.call_api, 965 resource_path=resource_path, 966 method=method, 967 header_params=header_params, 968 body=create_catalog_details) 969 else: 970 return self.base_client.call_api( 971 resource_path=resource_path, 972 method=method, 973 header_params=header_params, 974 body=create_catalog_details) 975 976 def create_catalog_private_endpoint(self, create_catalog_private_endpoint_details, **kwargs): 977 """ 978 Create a new private reverse connection endpoint. 979 980 981 :param oci.data_catalog.models.CreateCatalogPrivateEndpointDetails create_catalog_private_endpoint_details: (required) 982 The information used to create the private reverse connection. 983 984 :param str opc_request_id: (optional) 985 The client request ID for tracing. 986 987 :param str opc_retry_token: (optional) 988 A token that uniquely identifies a request so it can be retried in case of a timeout or 989 server error without risk of executing that same action again. Retry tokens expire after 24 990 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 991 has been deleted and purged from the system, then a retry of the original creation request 992 might be rejected. 993 994 :param obj retry_strategy: (optional) 995 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 996 997 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 998 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 999 1000 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1001 1002 :return: A :class:`~oci.response.Response` object with data of type None 1003 :rtype: :class:`~oci.response.Response` 1004 1005 :example: 1006 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_catalog_private_endpoint.py.html>`__ to see an example of how to use create_catalog_private_endpoint API. 1007 """ 1008 resource_path = "/catalogPrivateEndpoints" 1009 method = "POST" 1010 1011 # Don't accept unknown kwargs 1012 expected_kwargs = [ 1013 "retry_strategy", 1014 "opc_request_id", 1015 "opc_retry_token" 1016 ] 1017 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1018 if extra_kwargs: 1019 raise ValueError( 1020 "create_catalog_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) 1021 1022 header_params = { 1023 "accept": "application/json", 1024 "content-type": "application/json", 1025 "opc-request-id": kwargs.get("opc_request_id", missing), 1026 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1027 } 1028 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1029 1030 retry_strategy = self.base_client.get_preferred_retry_strategy( 1031 operation_retry_strategy=kwargs.get('retry_strategy'), 1032 client_retry_strategy=self.retry_strategy 1033 ) 1034 1035 if retry_strategy: 1036 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1037 self.base_client.add_opc_retry_token_if_needed(header_params) 1038 self.base_client.add_opc_client_retries_header(header_params) 1039 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1040 return retry_strategy.make_retrying_call( 1041 self.base_client.call_api, 1042 resource_path=resource_path, 1043 method=method, 1044 header_params=header_params, 1045 body=create_catalog_private_endpoint_details) 1046 else: 1047 return self.base_client.call_api( 1048 resource_path=resource_path, 1049 method=method, 1050 header_params=header_params, 1051 body=create_catalog_private_endpoint_details) 1052 1053 def create_connection(self, catalog_id, data_asset_key, create_connection_details, **kwargs): 1054 """ 1055 Creates a new connection. 1056 1057 1058 :param str catalog_id: (required) 1059 Unique catalog identifier. 1060 1061 :param str data_asset_key: (required) 1062 Unique data asset key. 1063 1064 :param oci.data_catalog.models.CreateConnectionDetails create_connection_details: (required) 1065 The information used to create the connection. 1066 1067 :param str opc_request_id: (optional) 1068 The client request ID for tracing. 1069 1070 :param str opc_retry_token: (optional) 1071 A token that uniquely identifies a request so it can be retried in case of a timeout or 1072 server error without risk of executing that same action again. Retry tokens expire after 24 1073 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1074 has been deleted and purged from the system, then a retry of the original creation request 1075 might be rejected. 1076 1077 :param obj retry_strategy: (optional) 1078 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1079 1080 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1081 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1082 1083 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1084 1085 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Connection` 1086 :rtype: :class:`~oci.response.Response` 1087 1088 :example: 1089 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_connection.py.html>`__ to see an example of how to use create_connection API. 1090 """ 1091 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/connections" 1092 method = "POST" 1093 1094 # Don't accept unknown kwargs 1095 expected_kwargs = [ 1096 "retry_strategy", 1097 "opc_request_id", 1098 "opc_retry_token" 1099 ] 1100 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1101 if extra_kwargs: 1102 raise ValueError( 1103 "create_connection got unknown kwargs: {!r}".format(extra_kwargs)) 1104 1105 path_params = { 1106 "catalogId": catalog_id, 1107 "dataAssetKey": data_asset_key 1108 } 1109 1110 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1111 1112 for (k, v) in six.iteritems(path_params): 1113 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1114 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1115 1116 header_params = { 1117 "accept": "application/json", 1118 "content-type": "application/json", 1119 "opc-request-id": kwargs.get("opc_request_id", missing), 1120 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1121 } 1122 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1123 1124 retry_strategy = self.base_client.get_preferred_retry_strategy( 1125 operation_retry_strategy=kwargs.get('retry_strategy'), 1126 client_retry_strategy=self.retry_strategy 1127 ) 1128 1129 if retry_strategy: 1130 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1131 self.base_client.add_opc_retry_token_if_needed(header_params) 1132 self.base_client.add_opc_client_retries_header(header_params) 1133 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1134 return retry_strategy.make_retrying_call( 1135 self.base_client.call_api, 1136 resource_path=resource_path, 1137 method=method, 1138 path_params=path_params, 1139 header_params=header_params, 1140 body=create_connection_details, 1141 response_type="Connection") 1142 else: 1143 return self.base_client.call_api( 1144 resource_path=resource_path, 1145 method=method, 1146 path_params=path_params, 1147 header_params=header_params, 1148 body=create_connection_details, 1149 response_type="Connection") 1150 1151 def create_custom_property(self, catalog_id, namespace_id, create_custom_property_details, **kwargs): 1152 """ 1153 Create a new Custom Property 1154 1155 1156 :param str catalog_id: (required) 1157 Unique catalog identifier. 1158 1159 :param str namespace_id: (required) 1160 Unique namespace identifier. 1161 1162 :param oci.data_catalog.models.CreateCustomPropertyDetails create_custom_property_details: (required) 1163 The information used to create the Custom Property. 1164 1165 :param str opc_request_id: (optional) 1166 The client request ID for tracing. 1167 1168 :param str opc_retry_token: (optional) 1169 A token that uniquely identifies a request so it can be retried in case of a timeout or 1170 server error without risk of executing that same action again. Retry tokens expire after 24 1171 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1172 has been deleted and purged from the system, then a retry of the original creation request 1173 might be rejected. 1174 1175 :param obj retry_strategy: (optional) 1176 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1177 1178 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1179 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1180 1181 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1182 1183 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.CustomProperty` 1184 :rtype: :class:`~oci.response.Response` 1185 1186 :example: 1187 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_custom_property.py.html>`__ to see an example of how to use create_custom_property API. 1188 """ 1189 resource_path = "/catalogs/{catalogId}/namespaces/{namespaceId}/customProperties" 1190 method = "POST" 1191 1192 # Don't accept unknown kwargs 1193 expected_kwargs = [ 1194 "retry_strategy", 1195 "opc_request_id", 1196 "opc_retry_token" 1197 ] 1198 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1199 if extra_kwargs: 1200 raise ValueError( 1201 "create_custom_property got unknown kwargs: {!r}".format(extra_kwargs)) 1202 1203 path_params = { 1204 "catalogId": catalog_id, 1205 "namespaceId": namespace_id 1206 } 1207 1208 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1209 1210 for (k, v) in six.iteritems(path_params): 1211 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1212 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1213 1214 header_params = { 1215 "accept": "application/json", 1216 "content-type": "application/json", 1217 "opc-request-id": kwargs.get("opc_request_id", missing), 1218 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1219 } 1220 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1221 1222 retry_strategy = self.base_client.get_preferred_retry_strategy( 1223 operation_retry_strategy=kwargs.get('retry_strategy'), 1224 client_retry_strategy=self.retry_strategy 1225 ) 1226 1227 if retry_strategy: 1228 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1229 self.base_client.add_opc_retry_token_if_needed(header_params) 1230 self.base_client.add_opc_client_retries_header(header_params) 1231 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1232 return retry_strategy.make_retrying_call( 1233 self.base_client.call_api, 1234 resource_path=resource_path, 1235 method=method, 1236 path_params=path_params, 1237 header_params=header_params, 1238 body=create_custom_property_details, 1239 response_type="CustomProperty") 1240 else: 1241 return self.base_client.call_api( 1242 resource_path=resource_path, 1243 method=method, 1244 path_params=path_params, 1245 header_params=header_params, 1246 body=create_custom_property_details, 1247 response_type="CustomProperty") 1248 1249 def create_data_asset(self, catalog_id, create_data_asset_details, **kwargs): 1250 """ 1251 Create a new data asset. 1252 1253 1254 :param str catalog_id: (required) 1255 Unique catalog identifier. 1256 1257 :param oci.data_catalog.models.CreateDataAssetDetails create_data_asset_details: (required) 1258 The information used to create the data asset. 1259 1260 :param str opc_request_id: (optional) 1261 The client request ID for tracing. 1262 1263 :param str opc_retry_token: (optional) 1264 A token that uniquely identifies a request so it can be retried in case of a timeout or 1265 server error without risk of executing that same action again. Retry tokens expire after 24 1266 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1267 has been deleted and purged from the system, then a retry of the original creation request 1268 might be rejected. 1269 1270 :param obj retry_strategy: (optional) 1271 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1272 1273 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1274 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1275 1276 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1277 1278 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.DataAsset` 1279 :rtype: :class:`~oci.response.Response` 1280 1281 :example: 1282 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_data_asset.py.html>`__ to see an example of how to use create_data_asset API. 1283 """ 1284 resource_path = "/catalogs/{catalogId}/dataAssets" 1285 method = "POST" 1286 1287 # Don't accept unknown kwargs 1288 expected_kwargs = [ 1289 "retry_strategy", 1290 "opc_request_id", 1291 "opc_retry_token" 1292 ] 1293 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1294 if extra_kwargs: 1295 raise ValueError( 1296 "create_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) 1297 1298 path_params = { 1299 "catalogId": catalog_id 1300 } 1301 1302 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1303 1304 for (k, v) in six.iteritems(path_params): 1305 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1306 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1307 1308 header_params = { 1309 "accept": "application/json", 1310 "content-type": "application/json", 1311 "opc-request-id": kwargs.get("opc_request_id", missing), 1312 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1313 } 1314 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1315 1316 retry_strategy = self.base_client.get_preferred_retry_strategy( 1317 operation_retry_strategy=kwargs.get('retry_strategy'), 1318 client_retry_strategy=self.retry_strategy 1319 ) 1320 1321 if retry_strategy: 1322 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1323 self.base_client.add_opc_retry_token_if_needed(header_params) 1324 self.base_client.add_opc_client_retries_header(header_params) 1325 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1326 return retry_strategy.make_retrying_call( 1327 self.base_client.call_api, 1328 resource_path=resource_path, 1329 method=method, 1330 path_params=path_params, 1331 header_params=header_params, 1332 body=create_data_asset_details, 1333 response_type="DataAsset") 1334 else: 1335 return self.base_client.call_api( 1336 resource_path=resource_path, 1337 method=method, 1338 path_params=path_params, 1339 header_params=header_params, 1340 body=create_data_asset_details, 1341 response_type="DataAsset") 1342 1343 def create_data_asset_tag(self, catalog_id, data_asset_key, create_data_asset_tag_details, **kwargs): 1344 """ 1345 Creates a new data asset tag. 1346 1347 1348 :param str catalog_id: (required) 1349 Unique catalog identifier. 1350 1351 :param str data_asset_key: (required) 1352 Unique data asset key. 1353 1354 :param oci.data_catalog.models.CreateTagDetails create_data_asset_tag_details: (required) 1355 The information used to create the data asset tag. 1356 1357 :param str opc_request_id: (optional) 1358 The client request ID for tracing. 1359 1360 :param str opc_retry_token: (optional) 1361 A token that uniquely identifies a request so it can be retried in case of a timeout or 1362 server error without risk of executing that same action again. Retry tokens expire after 24 1363 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1364 has been deleted and purged from the system, then a retry of the original creation request 1365 might be rejected. 1366 1367 :param obj retry_strategy: (optional) 1368 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1369 1370 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1371 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1372 1373 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1374 1375 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.DataAssetTag` 1376 :rtype: :class:`~oci.response.Response` 1377 1378 :example: 1379 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_data_asset_tag.py.html>`__ to see an example of how to use create_data_asset_tag API. 1380 """ 1381 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/tags" 1382 method = "POST" 1383 1384 # Don't accept unknown kwargs 1385 expected_kwargs = [ 1386 "retry_strategy", 1387 "opc_request_id", 1388 "opc_retry_token" 1389 ] 1390 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1391 if extra_kwargs: 1392 raise ValueError( 1393 "create_data_asset_tag got unknown kwargs: {!r}".format(extra_kwargs)) 1394 1395 path_params = { 1396 "catalogId": catalog_id, 1397 "dataAssetKey": data_asset_key 1398 } 1399 1400 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1401 1402 for (k, v) in six.iteritems(path_params): 1403 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1404 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1405 1406 header_params = { 1407 "accept": "application/json", 1408 "content-type": "application/json", 1409 "opc-request-id": kwargs.get("opc_request_id", missing), 1410 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1411 } 1412 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1413 1414 retry_strategy = self.base_client.get_preferred_retry_strategy( 1415 operation_retry_strategy=kwargs.get('retry_strategy'), 1416 client_retry_strategy=self.retry_strategy 1417 ) 1418 1419 if retry_strategy: 1420 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1421 self.base_client.add_opc_retry_token_if_needed(header_params) 1422 self.base_client.add_opc_client_retries_header(header_params) 1423 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1424 return retry_strategy.make_retrying_call( 1425 self.base_client.call_api, 1426 resource_path=resource_path, 1427 method=method, 1428 path_params=path_params, 1429 header_params=header_params, 1430 body=create_data_asset_tag_details, 1431 response_type="DataAssetTag") 1432 else: 1433 return self.base_client.call_api( 1434 resource_path=resource_path, 1435 method=method, 1436 path_params=path_params, 1437 header_params=header_params, 1438 body=create_data_asset_tag_details, 1439 response_type="DataAssetTag") 1440 1441 def create_entity(self, catalog_id, data_asset_key, create_entity_details, **kwargs): 1442 """ 1443 Creates a new data entity. 1444 1445 1446 :param str catalog_id: (required) 1447 Unique catalog identifier. 1448 1449 :param str data_asset_key: (required) 1450 Unique data asset key. 1451 1452 :param oci.data_catalog.models.CreateEntityDetails create_entity_details: (required) 1453 The information used to create the data entity. 1454 1455 :param str opc_request_id: (optional) 1456 The client request ID for tracing. 1457 1458 :param str opc_retry_token: (optional) 1459 A token that uniquely identifies a request so it can be retried in case of a timeout or 1460 server error without risk of executing that same action again. Retry tokens expire after 24 1461 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1462 has been deleted and purged from the system, then a retry of the original creation request 1463 might be rejected. 1464 1465 :param obj retry_strategy: (optional) 1466 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1467 1468 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1469 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1470 1471 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1472 1473 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Entity` 1474 :rtype: :class:`~oci.response.Response` 1475 1476 :example: 1477 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_entity.py.html>`__ to see an example of how to use create_entity API. 1478 """ 1479 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities" 1480 method = "POST" 1481 1482 # Don't accept unknown kwargs 1483 expected_kwargs = [ 1484 "retry_strategy", 1485 "opc_request_id", 1486 "opc_retry_token" 1487 ] 1488 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1489 if extra_kwargs: 1490 raise ValueError( 1491 "create_entity got unknown kwargs: {!r}".format(extra_kwargs)) 1492 1493 path_params = { 1494 "catalogId": catalog_id, 1495 "dataAssetKey": data_asset_key 1496 } 1497 1498 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1499 1500 for (k, v) in six.iteritems(path_params): 1501 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1502 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1503 1504 header_params = { 1505 "accept": "application/json", 1506 "content-type": "application/json", 1507 "opc-request-id": kwargs.get("opc_request_id", missing), 1508 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1509 } 1510 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1511 1512 retry_strategy = self.base_client.get_preferred_retry_strategy( 1513 operation_retry_strategy=kwargs.get('retry_strategy'), 1514 client_retry_strategy=self.retry_strategy 1515 ) 1516 1517 if retry_strategy: 1518 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1519 self.base_client.add_opc_retry_token_if_needed(header_params) 1520 self.base_client.add_opc_client_retries_header(header_params) 1521 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1522 return retry_strategy.make_retrying_call( 1523 self.base_client.call_api, 1524 resource_path=resource_path, 1525 method=method, 1526 path_params=path_params, 1527 header_params=header_params, 1528 body=create_entity_details, 1529 response_type="Entity") 1530 else: 1531 return self.base_client.call_api( 1532 resource_path=resource_path, 1533 method=method, 1534 path_params=path_params, 1535 header_params=header_params, 1536 body=create_entity_details, 1537 response_type="Entity") 1538 1539 def create_entity_tag(self, catalog_id, data_asset_key, entity_key, create_entity_tag_details, **kwargs): 1540 """ 1541 Creates a new entity tag. 1542 1543 1544 :param str catalog_id: (required) 1545 Unique catalog identifier. 1546 1547 :param str data_asset_key: (required) 1548 Unique data asset key. 1549 1550 :param str entity_key: (required) 1551 Unique entity key. 1552 1553 :param oci.data_catalog.models.CreateTagDetails create_entity_tag_details: (required) 1554 The information used to create the entity tag. 1555 1556 :param str opc_request_id: (optional) 1557 The client request ID for tracing. 1558 1559 :param str opc_retry_token: (optional) 1560 A token that uniquely identifies a request so it can be retried in case of a timeout or 1561 server error without risk of executing that same action again. Retry tokens expire after 24 1562 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1563 has been deleted and purged from the system, then a retry of the original creation request 1564 might be rejected. 1565 1566 :param obj retry_strategy: (optional) 1567 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1568 1569 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1570 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1571 1572 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1573 1574 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.EntityTag` 1575 :rtype: :class:`~oci.response.Response` 1576 1577 :example: 1578 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_entity_tag.py.html>`__ to see an example of how to use create_entity_tag API. 1579 """ 1580 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/tags" 1581 method = "POST" 1582 1583 # Don't accept unknown kwargs 1584 expected_kwargs = [ 1585 "retry_strategy", 1586 "opc_request_id", 1587 "opc_retry_token" 1588 ] 1589 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1590 if extra_kwargs: 1591 raise ValueError( 1592 "create_entity_tag got unknown kwargs: {!r}".format(extra_kwargs)) 1593 1594 path_params = { 1595 "catalogId": catalog_id, 1596 "dataAssetKey": data_asset_key, 1597 "entityKey": entity_key 1598 } 1599 1600 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1601 1602 for (k, v) in six.iteritems(path_params): 1603 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1604 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1605 1606 header_params = { 1607 "accept": "application/json", 1608 "content-type": "application/json", 1609 "opc-request-id": kwargs.get("opc_request_id", missing), 1610 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1611 } 1612 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1613 1614 retry_strategy = self.base_client.get_preferred_retry_strategy( 1615 operation_retry_strategy=kwargs.get('retry_strategy'), 1616 client_retry_strategy=self.retry_strategy 1617 ) 1618 1619 if retry_strategy: 1620 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1621 self.base_client.add_opc_retry_token_if_needed(header_params) 1622 self.base_client.add_opc_client_retries_header(header_params) 1623 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1624 return retry_strategy.make_retrying_call( 1625 self.base_client.call_api, 1626 resource_path=resource_path, 1627 method=method, 1628 path_params=path_params, 1629 header_params=header_params, 1630 body=create_entity_tag_details, 1631 response_type="EntityTag") 1632 else: 1633 return self.base_client.call_api( 1634 resource_path=resource_path, 1635 method=method, 1636 path_params=path_params, 1637 header_params=header_params, 1638 body=create_entity_tag_details, 1639 response_type="EntityTag") 1640 1641 def create_folder(self, catalog_id, data_asset_key, create_folder_details, **kwargs): 1642 """ 1643 Creates a new folder. 1644 1645 1646 :param str catalog_id: (required) 1647 Unique catalog identifier. 1648 1649 :param str data_asset_key: (required) 1650 Unique data asset key. 1651 1652 :param oci.data_catalog.models.CreateFolderDetails create_folder_details: (required) 1653 The information used to create the folder. 1654 1655 :param str opc_request_id: (optional) 1656 The client request ID for tracing. 1657 1658 :param str opc_retry_token: (optional) 1659 A token that uniquely identifies a request so it can be retried in case of a timeout or 1660 server error without risk of executing that same action again. Retry tokens expire after 24 1661 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1662 has been deleted and purged from the system, then a retry of the original creation request 1663 might be rejected. 1664 1665 :param obj retry_strategy: (optional) 1666 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1667 1668 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1669 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1670 1671 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1672 1673 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Folder` 1674 :rtype: :class:`~oci.response.Response` 1675 1676 :example: 1677 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_folder.py.html>`__ to see an example of how to use create_folder API. 1678 """ 1679 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/folders" 1680 method = "POST" 1681 1682 # Don't accept unknown kwargs 1683 expected_kwargs = [ 1684 "retry_strategy", 1685 "opc_request_id", 1686 "opc_retry_token" 1687 ] 1688 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1689 if extra_kwargs: 1690 raise ValueError( 1691 "create_folder got unknown kwargs: {!r}".format(extra_kwargs)) 1692 1693 path_params = { 1694 "catalogId": catalog_id, 1695 "dataAssetKey": data_asset_key 1696 } 1697 1698 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1699 1700 for (k, v) in six.iteritems(path_params): 1701 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1702 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1703 1704 header_params = { 1705 "accept": "application/json", 1706 "content-type": "application/json", 1707 "opc-request-id": kwargs.get("opc_request_id", missing), 1708 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1709 } 1710 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1711 1712 retry_strategy = self.base_client.get_preferred_retry_strategy( 1713 operation_retry_strategy=kwargs.get('retry_strategy'), 1714 client_retry_strategy=self.retry_strategy 1715 ) 1716 1717 if retry_strategy: 1718 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1719 self.base_client.add_opc_retry_token_if_needed(header_params) 1720 self.base_client.add_opc_client_retries_header(header_params) 1721 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1722 return retry_strategy.make_retrying_call( 1723 self.base_client.call_api, 1724 resource_path=resource_path, 1725 method=method, 1726 path_params=path_params, 1727 header_params=header_params, 1728 body=create_folder_details, 1729 response_type="Folder") 1730 else: 1731 return self.base_client.call_api( 1732 resource_path=resource_path, 1733 method=method, 1734 path_params=path_params, 1735 header_params=header_params, 1736 body=create_folder_details, 1737 response_type="Folder") 1738 1739 def create_folder_tag(self, catalog_id, data_asset_key, folder_key, create_folder_tag_details, **kwargs): 1740 """ 1741 Creates a new folder tag. 1742 1743 1744 :param str catalog_id: (required) 1745 Unique catalog identifier. 1746 1747 :param str data_asset_key: (required) 1748 Unique data asset key. 1749 1750 :param str folder_key: (required) 1751 Unique folder key. 1752 1753 :param oci.data_catalog.models.CreateTagDetails create_folder_tag_details: (required) 1754 The information used to create the folder tag. 1755 1756 :param str opc_request_id: (optional) 1757 The client request ID for tracing. 1758 1759 :param str opc_retry_token: (optional) 1760 A token that uniquely identifies a request so it can be retried in case of a timeout or 1761 server error without risk of executing that same action again. Retry tokens expire after 24 1762 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1763 has been deleted and purged from the system, then a retry of the original creation request 1764 might be rejected. 1765 1766 :param obj retry_strategy: (optional) 1767 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1768 1769 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1770 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1771 1772 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1773 1774 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.FolderTag` 1775 :rtype: :class:`~oci.response.Response` 1776 1777 :example: 1778 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_folder_tag.py.html>`__ to see an example of how to use create_folder_tag API. 1779 """ 1780 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/folders/{folderKey}/tags" 1781 method = "POST" 1782 1783 # Don't accept unknown kwargs 1784 expected_kwargs = [ 1785 "retry_strategy", 1786 "opc_request_id", 1787 "opc_retry_token" 1788 ] 1789 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1790 if extra_kwargs: 1791 raise ValueError( 1792 "create_folder_tag got unknown kwargs: {!r}".format(extra_kwargs)) 1793 1794 path_params = { 1795 "catalogId": catalog_id, 1796 "dataAssetKey": data_asset_key, 1797 "folderKey": folder_key 1798 } 1799 1800 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1801 1802 for (k, v) in six.iteritems(path_params): 1803 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1804 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1805 1806 header_params = { 1807 "accept": "application/json", 1808 "content-type": "application/json", 1809 "opc-request-id": kwargs.get("opc_request_id", missing), 1810 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1811 } 1812 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1813 1814 retry_strategy = self.base_client.get_preferred_retry_strategy( 1815 operation_retry_strategy=kwargs.get('retry_strategy'), 1816 client_retry_strategy=self.retry_strategy 1817 ) 1818 1819 if retry_strategy: 1820 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1821 self.base_client.add_opc_retry_token_if_needed(header_params) 1822 self.base_client.add_opc_client_retries_header(header_params) 1823 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1824 return retry_strategy.make_retrying_call( 1825 self.base_client.call_api, 1826 resource_path=resource_path, 1827 method=method, 1828 path_params=path_params, 1829 header_params=header_params, 1830 body=create_folder_tag_details, 1831 response_type="FolderTag") 1832 else: 1833 return self.base_client.call_api( 1834 resource_path=resource_path, 1835 method=method, 1836 path_params=path_params, 1837 header_params=header_params, 1838 body=create_folder_tag_details, 1839 response_type="FolderTag") 1840 1841 def create_glossary(self, catalog_id, create_glossary_details, **kwargs): 1842 """ 1843 Creates a new glossary. 1844 1845 1846 :param str catalog_id: (required) 1847 Unique catalog identifier. 1848 1849 :param oci.data_catalog.models.CreateGlossaryDetails create_glossary_details: (required) 1850 The information used to create the glossary. 1851 1852 :param str opc_request_id: (optional) 1853 The client request ID for tracing. 1854 1855 :param str opc_retry_token: (optional) 1856 A token that uniquely identifies a request so it can be retried in case of a timeout or 1857 server error without risk of executing that same action again. Retry tokens expire after 24 1858 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1859 has been deleted and purged from the system, then a retry of the original creation request 1860 might be rejected. 1861 1862 :param obj retry_strategy: (optional) 1863 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1864 1865 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1866 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1867 1868 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1869 1870 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Glossary` 1871 :rtype: :class:`~oci.response.Response` 1872 1873 :example: 1874 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_glossary.py.html>`__ to see an example of how to use create_glossary API. 1875 """ 1876 resource_path = "/catalogs/{catalogId}/glossaries" 1877 method = "POST" 1878 1879 # Don't accept unknown kwargs 1880 expected_kwargs = [ 1881 "retry_strategy", 1882 "opc_request_id", 1883 "opc_retry_token" 1884 ] 1885 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1886 if extra_kwargs: 1887 raise ValueError( 1888 "create_glossary got unknown kwargs: {!r}".format(extra_kwargs)) 1889 1890 path_params = { 1891 "catalogId": catalog_id 1892 } 1893 1894 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1895 1896 for (k, v) in six.iteritems(path_params): 1897 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1898 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1899 1900 header_params = { 1901 "accept": "application/json", 1902 "content-type": "application/json", 1903 "opc-request-id": kwargs.get("opc_request_id", missing), 1904 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1905 } 1906 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 1907 1908 retry_strategy = self.base_client.get_preferred_retry_strategy( 1909 operation_retry_strategy=kwargs.get('retry_strategy'), 1910 client_retry_strategy=self.retry_strategy 1911 ) 1912 1913 if retry_strategy: 1914 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 1915 self.base_client.add_opc_retry_token_if_needed(header_params) 1916 self.base_client.add_opc_client_retries_header(header_params) 1917 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 1918 return retry_strategy.make_retrying_call( 1919 self.base_client.call_api, 1920 resource_path=resource_path, 1921 method=method, 1922 path_params=path_params, 1923 header_params=header_params, 1924 body=create_glossary_details, 1925 response_type="Glossary") 1926 else: 1927 return self.base_client.call_api( 1928 resource_path=resource_path, 1929 method=method, 1930 path_params=path_params, 1931 header_params=header_params, 1932 body=create_glossary_details, 1933 response_type="Glossary") 1934 1935 def create_job(self, catalog_id, create_job_details, **kwargs): 1936 """ 1937 Creates a new job. 1938 1939 1940 :param str catalog_id: (required) 1941 Unique catalog identifier. 1942 1943 :param oci.data_catalog.models.CreateJobDetails create_job_details: (required) 1944 The information used to create the job. 1945 1946 :param str opc_request_id: (optional) 1947 The client request ID for tracing. 1948 1949 :param str opc_retry_token: (optional) 1950 A token that uniquely identifies a request so it can be retried in case of a timeout or 1951 server error without risk of executing that same action again. Retry tokens expire after 24 1952 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 1953 has been deleted and purged from the system, then a retry of the original creation request 1954 might be rejected. 1955 1956 :param obj retry_strategy: (optional) 1957 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 1958 1959 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 1960 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 1961 1962 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 1963 1964 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Job` 1965 :rtype: :class:`~oci.response.Response` 1966 1967 :example: 1968 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_job.py.html>`__ to see an example of how to use create_job API. 1969 """ 1970 resource_path = "/catalogs/{catalogId}/jobs" 1971 method = "POST" 1972 1973 # Don't accept unknown kwargs 1974 expected_kwargs = [ 1975 "retry_strategy", 1976 "opc_request_id", 1977 "opc_retry_token" 1978 ] 1979 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 1980 if extra_kwargs: 1981 raise ValueError( 1982 "create_job got unknown kwargs: {!r}".format(extra_kwargs)) 1983 1984 path_params = { 1985 "catalogId": catalog_id 1986 } 1987 1988 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 1989 1990 for (k, v) in six.iteritems(path_params): 1991 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 1992 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 1993 1994 header_params = { 1995 "accept": "application/json", 1996 "content-type": "application/json", 1997 "opc-request-id": kwargs.get("opc_request_id", missing), 1998 "opc-retry-token": kwargs.get("opc_retry_token", missing) 1999 } 2000 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2001 2002 retry_strategy = self.base_client.get_preferred_retry_strategy( 2003 operation_retry_strategy=kwargs.get('retry_strategy'), 2004 client_retry_strategy=self.retry_strategy 2005 ) 2006 2007 if retry_strategy: 2008 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2009 self.base_client.add_opc_retry_token_if_needed(header_params) 2010 self.base_client.add_opc_client_retries_header(header_params) 2011 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2012 return retry_strategy.make_retrying_call( 2013 self.base_client.call_api, 2014 resource_path=resource_path, 2015 method=method, 2016 path_params=path_params, 2017 header_params=header_params, 2018 body=create_job_details, 2019 response_type="Job") 2020 else: 2021 return self.base_client.call_api( 2022 resource_path=resource_path, 2023 method=method, 2024 path_params=path_params, 2025 header_params=header_params, 2026 body=create_job_details, 2027 response_type="Job") 2028 2029 def create_job_definition(self, catalog_id, create_job_definition_details, **kwargs): 2030 """ 2031 Creates a new job definition. 2032 2033 2034 :param str catalog_id: (required) 2035 Unique catalog identifier. 2036 2037 :param oci.data_catalog.models.CreateJobDefinitionDetails create_job_definition_details: (required) 2038 The information used to create the job definition. 2039 2040 :param str opc_request_id: (optional) 2041 The client request ID for tracing. 2042 2043 :param str opc_retry_token: (optional) 2044 A token that uniquely identifies a request so it can be retried in case of a timeout or 2045 server error without risk of executing that same action again. Retry tokens expire after 24 2046 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 2047 has been deleted and purged from the system, then a retry of the original creation request 2048 might be rejected. 2049 2050 :param obj retry_strategy: (optional) 2051 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2052 2053 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2054 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2055 2056 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2057 2058 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobDefinition` 2059 :rtype: :class:`~oci.response.Response` 2060 2061 :example: 2062 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_job_definition.py.html>`__ to see an example of how to use create_job_definition API. 2063 """ 2064 resource_path = "/catalogs/{catalogId}/jobDefinitions" 2065 method = "POST" 2066 2067 # Don't accept unknown kwargs 2068 expected_kwargs = [ 2069 "retry_strategy", 2070 "opc_request_id", 2071 "opc_retry_token" 2072 ] 2073 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2074 if extra_kwargs: 2075 raise ValueError( 2076 "create_job_definition got unknown kwargs: {!r}".format(extra_kwargs)) 2077 2078 path_params = { 2079 "catalogId": catalog_id 2080 } 2081 2082 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2083 2084 for (k, v) in six.iteritems(path_params): 2085 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2086 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2087 2088 header_params = { 2089 "accept": "application/json", 2090 "content-type": "application/json", 2091 "opc-request-id": kwargs.get("opc_request_id", missing), 2092 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2093 } 2094 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2095 2096 retry_strategy = self.base_client.get_preferred_retry_strategy( 2097 operation_retry_strategy=kwargs.get('retry_strategy'), 2098 client_retry_strategy=self.retry_strategy 2099 ) 2100 2101 if retry_strategy: 2102 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2103 self.base_client.add_opc_retry_token_if_needed(header_params) 2104 self.base_client.add_opc_client_retries_header(header_params) 2105 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2106 return retry_strategy.make_retrying_call( 2107 self.base_client.call_api, 2108 resource_path=resource_path, 2109 method=method, 2110 path_params=path_params, 2111 header_params=header_params, 2112 body=create_job_definition_details, 2113 response_type="JobDefinition") 2114 else: 2115 return self.base_client.call_api( 2116 resource_path=resource_path, 2117 method=method, 2118 path_params=path_params, 2119 header_params=header_params, 2120 body=create_job_definition_details, 2121 response_type="JobDefinition") 2122 2123 def create_job_execution(self, catalog_id, job_key, create_job_execution_details, **kwargs): 2124 """ 2125 Creates a new job execution. 2126 2127 2128 :param str catalog_id: (required) 2129 Unique catalog identifier. 2130 2131 :param str job_key: (required) 2132 Unique job key. 2133 2134 :param oci.data_catalog.models.CreateJobExecutionDetails create_job_execution_details: (required) 2135 The information used to create the job execution. 2136 2137 :param str opc_request_id: (optional) 2138 The client request ID for tracing. 2139 2140 :param str opc_retry_token: (optional) 2141 A token that uniquely identifies a request so it can be retried in case of a timeout or 2142 server error without risk of executing that same action again. Retry tokens expire after 24 2143 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 2144 has been deleted and purged from the system, then a retry of the original creation request 2145 might be rejected. 2146 2147 :param obj retry_strategy: (optional) 2148 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2149 2150 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2151 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2152 2153 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2154 2155 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobExecution` 2156 :rtype: :class:`~oci.response.Response` 2157 2158 :example: 2159 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_job_execution.py.html>`__ to see an example of how to use create_job_execution API. 2160 """ 2161 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}/executions" 2162 method = "POST" 2163 2164 # Don't accept unknown kwargs 2165 expected_kwargs = [ 2166 "retry_strategy", 2167 "opc_request_id", 2168 "opc_retry_token" 2169 ] 2170 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2171 if extra_kwargs: 2172 raise ValueError( 2173 "create_job_execution got unknown kwargs: {!r}".format(extra_kwargs)) 2174 2175 path_params = { 2176 "catalogId": catalog_id, 2177 "jobKey": job_key 2178 } 2179 2180 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2181 2182 for (k, v) in six.iteritems(path_params): 2183 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2184 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2185 2186 header_params = { 2187 "accept": "application/json", 2188 "content-type": "application/json", 2189 "opc-request-id": kwargs.get("opc_request_id", missing), 2190 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2191 } 2192 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2193 2194 retry_strategy = self.base_client.get_preferred_retry_strategy( 2195 operation_retry_strategy=kwargs.get('retry_strategy'), 2196 client_retry_strategy=self.retry_strategy 2197 ) 2198 2199 if retry_strategy: 2200 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2201 self.base_client.add_opc_retry_token_if_needed(header_params) 2202 self.base_client.add_opc_client_retries_header(header_params) 2203 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2204 return retry_strategy.make_retrying_call( 2205 self.base_client.call_api, 2206 resource_path=resource_path, 2207 method=method, 2208 path_params=path_params, 2209 header_params=header_params, 2210 body=create_job_execution_details, 2211 response_type="JobExecution") 2212 else: 2213 return self.base_client.call_api( 2214 resource_path=resource_path, 2215 method=method, 2216 path_params=path_params, 2217 header_params=header_params, 2218 body=create_job_execution_details, 2219 response_type="JobExecution") 2220 2221 def create_metastore(self, create_metastore_details, **kwargs): 2222 """ 2223 Creates a new metastore. 2224 2225 2226 :param oci.data_catalog.models.CreateMetastoreDetails create_metastore_details: (required) 2227 Information about a new metastore to be created. 2228 2229 :param str opc_retry_token: (optional) 2230 A token that uniquely identifies a request so it can be retried in case of a timeout or 2231 server error without risk of executing that same action again. Retry tokens expire after 24 2232 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 2233 has been deleted and purged from the system, then a retry of the original creation request 2234 might be rejected. 2235 2236 :param str opc_request_id: (optional) 2237 The client request ID for tracing. 2238 2239 :param obj retry_strategy: (optional) 2240 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2241 2242 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2243 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2244 2245 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2246 2247 :return: A :class:`~oci.response.Response` object with data of type None 2248 :rtype: :class:`~oci.response.Response` 2249 2250 :example: 2251 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_metastore.py.html>`__ to see an example of how to use create_metastore API. 2252 """ 2253 resource_path = "/metastores" 2254 method = "POST" 2255 2256 # Don't accept unknown kwargs 2257 expected_kwargs = [ 2258 "retry_strategy", 2259 "opc_retry_token", 2260 "opc_request_id" 2261 ] 2262 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2263 if extra_kwargs: 2264 raise ValueError( 2265 "create_metastore got unknown kwargs: {!r}".format(extra_kwargs)) 2266 2267 header_params = { 2268 "accept": "application/json", 2269 "content-type": "application/json", 2270 "opc-retry-token": kwargs.get("opc_retry_token", missing), 2271 "opc-request-id": kwargs.get("opc_request_id", missing) 2272 } 2273 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2274 2275 retry_strategy = self.base_client.get_preferred_retry_strategy( 2276 operation_retry_strategy=kwargs.get('retry_strategy'), 2277 client_retry_strategy=self.retry_strategy 2278 ) 2279 2280 if retry_strategy: 2281 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2282 self.base_client.add_opc_retry_token_if_needed(header_params) 2283 self.base_client.add_opc_client_retries_header(header_params) 2284 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2285 return retry_strategy.make_retrying_call( 2286 self.base_client.call_api, 2287 resource_path=resource_path, 2288 method=method, 2289 header_params=header_params, 2290 body=create_metastore_details) 2291 else: 2292 return self.base_client.call_api( 2293 resource_path=resource_path, 2294 method=method, 2295 header_params=header_params, 2296 body=create_metastore_details) 2297 2298 def create_namespace(self, catalog_id, create_namespace_details, **kwargs): 2299 """ 2300 Create a new Namespace to be used by a custom property 2301 2302 2303 :param str catalog_id: (required) 2304 Unique catalog identifier. 2305 2306 :param oci.data_catalog.models.CreateNamespaceDetails create_namespace_details: (required) 2307 The information used to create the Namespace. 2308 2309 :param str opc_request_id: (optional) 2310 The client request ID for tracing. 2311 2312 :param str opc_retry_token: (optional) 2313 A token that uniquely identifies a request so it can be retried in case of a timeout or 2314 server error without risk of executing that same action again. Retry tokens expire after 24 2315 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 2316 has been deleted and purged from the system, then a retry of the original creation request 2317 might be rejected. 2318 2319 :param obj retry_strategy: (optional) 2320 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2321 2322 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2323 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2324 2325 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2326 2327 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Namespace` 2328 :rtype: :class:`~oci.response.Response` 2329 2330 :example: 2331 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_namespace.py.html>`__ to see an example of how to use create_namespace API. 2332 """ 2333 resource_path = "/catalogs/{catalogId}/namespaces" 2334 method = "POST" 2335 2336 # Don't accept unknown kwargs 2337 expected_kwargs = [ 2338 "retry_strategy", 2339 "opc_request_id", 2340 "opc_retry_token" 2341 ] 2342 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2343 if extra_kwargs: 2344 raise ValueError( 2345 "create_namespace got unknown kwargs: {!r}".format(extra_kwargs)) 2346 2347 path_params = { 2348 "catalogId": catalog_id 2349 } 2350 2351 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2352 2353 for (k, v) in six.iteritems(path_params): 2354 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2355 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2356 2357 header_params = { 2358 "accept": "application/json", 2359 "content-type": "application/json", 2360 "opc-request-id": kwargs.get("opc_request_id", missing), 2361 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2362 } 2363 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2364 2365 retry_strategy = self.base_client.get_preferred_retry_strategy( 2366 operation_retry_strategy=kwargs.get('retry_strategy'), 2367 client_retry_strategy=self.retry_strategy 2368 ) 2369 2370 if retry_strategy: 2371 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2372 self.base_client.add_opc_retry_token_if_needed(header_params) 2373 self.base_client.add_opc_client_retries_header(header_params) 2374 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2375 return retry_strategy.make_retrying_call( 2376 self.base_client.call_api, 2377 resource_path=resource_path, 2378 method=method, 2379 path_params=path_params, 2380 header_params=header_params, 2381 body=create_namespace_details, 2382 response_type="Namespace") 2383 else: 2384 return self.base_client.call_api( 2385 resource_path=resource_path, 2386 method=method, 2387 path_params=path_params, 2388 header_params=header_params, 2389 body=create_namespace_details, 2390 response_type="Namespace") 2391 2392 def create_pattern(self, catalog_id, create_pattern_details, **kwargs): 2393 """ 2394 Create a new pattern. 2395 2396 2397 :param str catalog_id: (required) 2398 Unique catalog identifier. 2399 2400 :param oci.data_catalog.models.CreatePatternDetails create_pattern_details: (required) 2401 The information used to create the pattern. 2402 2403 :param str opc_request_id: (optional) 2404 The client request ID for tracing. 2405 2406 :param str opc_retry_token: (optional) 2407 A token that uniquely identifies a request so it can be retried in case of a timeout or 2408 server error without risk of executing that same action again. Retry tokens expire after 24 2409 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 2410 has been deleted and purged from the system, then a retry of the original creation request 2411 might be rejected. 2412 2413 :param obj retry_strategy: (optional) 2414 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2415 2416 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2417 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2418 2419 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2420 2421 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Pattern` 2422 :rtype: :class:`~oci.response.Response` 2423 2424 :example: 2425 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_pattern.py.html>`__ to see an example of how to use create_pattern API. 2426 """ 2427 resource_path = "/catalogs/{catalogId}/patterns" 2428 method = "POST" 2429 2430 # Don't accept unknown kwargs 2431 expected_kwargs = [ 2432 "retry_strategy", 2433 "opc_request_id", 2434 "opc_retry_token" 2435 ] 2436 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2437 if extra_kwargs: 2438 raise ValueError( 2439 "create_pattern got unknown kwargs: {!r}".format(extra_kwargs)) 2440 2441 path_params = { 2442 "catalogId": catalog_id 2443 } 2444 2445 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2446 2447 for (k, v) in six.iteritems(path_params): 2448 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2449 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2450 2451 header_params = { 2452 "accept": "application/json", 2453 "content-type": "application/json", 2454 "opc-request-id": kwargs.get("opc_request_id", missing), 2455 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2456 } 2457 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2458 2459 retry_strategy = self.base_client.get_preferred_retry_strategy( 2460 operation_retry_strategy=kwargs.get('retry_strategy'), 2461 client_retry_strategy=self.retry_strategy 2462 ) 2463 2464 if retry_strategy: 2465 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2466 self.base_client.add_opc_retry_token_if_needed(header_params) 2467 self.base_client.add_opc_client_retries_header(header_params) 2468 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2469 return retry_strategy.make_retrying_call( 2470 self.base_client.call_api, 2471 resource_path=resource_path, 2472 method=method, 2473 path_params=path_params, 2474 header_params=header_params, 2475 body=create_pattern_details, 2476 response_type="Pattern") 2477 else: 2478 return self.base_client.call_api( 2479 resource_path=resource_path, 2480 method=method, 2481 path_params=path_params, 2482 header_params=header_params, 2483 body=create_pattern_details, 2484 response_type="Pattern") 2485 2486 def create_term(self, catalog_id, glossary_key, create_term_details, **kwargs): 2487 """ 2488 Create a new term within a glossary. 2489 2490 2491 :param str catalog_id: (required) 2492 Unique catalog identifier. 2493 2494 :param str glossary_key: (required) 2495 Unique glossary key. 2496 2497 :param oci.data_catalog.models.CreateTermDetails create_term_details: (required) 2498 The information used to create the term. 2499 2500 :param str opc_request_id: (optional) 2501 The client request ID for tracing. 2502 2503 :param str opc_retry_token: (optional) 2504 A token that uniquely identifies a request so it can be retried in case of a timeout or 2505 server error without risk of executing that same action again. Retry tokens expire after 24 2506 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 2507 has been deleted and purged from the system, then a retry of the original creation request 2508 might be rejected. 2509 2510 :param obj retry_strategy: (optional) 2511 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2512 2513 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2514 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2515 2516 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2517 2518 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Term` 2519 :rtype: :class:`~oci.response.Response` 2520 2521 :example: 2522 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_term.py.html>`__ to see an example of how to use create_term API. 2523 """ 2524 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms" 2525 method = "POST" 2526 2527 # Don't accept unknown kwargs 2528 expected_kwargs = [ 2529 "retry_strategy", 2530 "opc_request_id", 2531 "opc_retry_token" 2532 ] 2533 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2534 if extra_kwargs: 2535 raise ValueError( 2536 "create_term got unknown kwargs: {!r}".format(extra_kwargs)) 2537 2538 path_params = { 2539 "catalogId": catalog_id, 2540 "glossaryKey": glossary_key 2541 } 2542 2543 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2544 2545 for (k, v) in six.iteritems(path_params): 2546 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2547 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2548 2549 header_params = { 2550 "accept": "application/json", 2551 "content-type": "application/json", 2552 "opc-request-id": kwargs.get("opc_request_id", missing), 2553 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2554 } 2555 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2556 2557 retry_strategy = self.base_client.get_preferred_retry_strategy( 2558 operation_retry_strategy=kwargs.get('retry_strategy'), 2559 client_retry_strategy=self.retry_strategy 2560 ) 2561 2562 if retry_strategy: 2563 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2564 self.base_client.add_opc_retry_token_if_needed(header_params) 2565 self.base_client.add_opc_client_retries_header(header_params) 2566 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2567 return retry_strategy.make_retrying_call( 2568 self.base_client.call_api, 2569 resource_path=resource_path, 2570 method=method, 2571 path_params=path_params, 2572 header_params=header_params, 2573 body=create_term_details, 2574 response_type="Term") 2575 else: 2576 return self.base_client.call_api( 2577 resource_path=resource_path, 2578 method=method, 2579 path_params=path_params, 2580 header_params=header_params, 2581 body=create_term_details, 2582 response_type="Term") 2583 2584 def create_term_relationship(self, catalog_id, glossary_key, term_key, create_term_relationship_details, **kwargs): 2585 """ 2586 Creates a new term relationship for this term within a glossary. 2587 2588 2589 :param str catalog_id: (required) 2590 Unique catalog identifier. 2591 2592 :param str glossary_key: (required) 2593 Unique glossary key. 2594 2595 :param str term_key: (required) 2596 Unique glossary term key. 2597 2598 :param oci.data_catalog.models.CreateTermRelationshipDetails create_term_relationship_details: (required) 2599 The information used to create the term relationship. 2600 2601 :param str opc_request_id: (optional) 2602 The client request ID for tracing. 2603 2604 :param str opc_retry_token: (optional) 2605 A token that uniquely identifies a request so it can be retried in case of a timeout or 2606 server error without risk of executing that same action again. Retry tokens expire after 24 2607 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 2608 has been deleted and purged from the system, then a retry of the original creation request 2609 might be rejected. 2610 2611 :param obj retry_strategy: (optional) 2612 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2613 2614 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2615 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2616 2617 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2618 2619 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.TermRelationship` 2620 :rtype: :class:`~oci.response.Response` 2621 2622 :example: 2623 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/create_term_relationship.py.html>`__ to see an example of how to use create_term_relationship API. 2624 """ 2625 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms/{termKey}/termRelationships" 2626 method = "POST" 2627 2628 # Don't accept unknown kwargs 2629 expected_kwargs = [ 2630 "retry_strategy", 2631 "opc_request_id", 2632 "opc_retry_token" 2633 ] 2634 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2635 if extra_kwargs: 2636 raise ValueError( 2637 "create_term_relationship got unknown kwargs: {!r}".format(extra_kwargs)) 2638 2639 path_params = { 2640 "catalogId": catalog_id, 2641 "glossaryKey": glossary_key, 2642 "termKey": term_key 2643 } 2644 2645 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2646 2647 for (k, v) in six.iteritems(path_params): 2648 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2649 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2650 2651 header_params = { 2652 "accept": "application/json", 2653 "content-type": "application/json", 2654 "opc-request-id": kwargs.get("opc_request_id", missing), 2655 "opc-retry-token": kwargs.get("opc_retry_token", missing) 2656 } 2657 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2658 2659 retry_strategy = self.base_client.get_preferred_retry_strategy( 2660 operation_retry_strategy=kwargs.get('retry_strategy'), 2661 client_retry_strategy=self.retry_strategy 2662 ) 2663 2664 if retry_strategy: 2665 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2666 self.base_client.add_opc_retry_token_if_needed(header_params) 2667 self.base_client.add_opc_client_retries_header(header_params) 2668 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2669 return retry_strategy.make_retrying_call( 2670 self.base_client.call_api, 2671 resource_path=resource_path, 2672 method=method, 2673 path_params=path_params, 2674 header_params=header_params, 2675 body=create_term_relationship_details, 2676 response_type="TermRelationship") 2677 else: 2678 return self.base_client.call_api( 2679 resource_path=resource_path, 2680 method=method, 2681 path_params=path_params, 2682 header_params=header_params, 2683 body=create_term_relationship_details, 2684 response_type="TermRelationship") 2685 2686 def delete_attribute(self, catalog_id, data_asset_key, entity_key, attribute_key, **kwargs): 2687 """ 2688 Deletes a specific entity attribute. 2689 2690 2691 :param str catalog_id: (required) 2692 Unique catalog identifier. 2693 2694 :param str data_asset_key: (required) 2695 Unique data asset key. 2696 2697 :param str entity_key: (required) 2698 Unique entity key. 2699 2700 :param str attribute_key: (required) 2701 Unique attribute key. 2702 2703 :param str if_match: (optional) 2704 For optimistic concurrency control. In the PUT or DELETE call 2705 for a resource, set the `if-match` parameter to the value of the 2706 etag from a previous GET or POST response for that resource. 2707 The resource will be updated or deleted only if the etag you 2708 provide matches the resource's current etag value. 2709 2710 :param str opc_request_id: (optional) 2711 The client request ID for tracing. 2712 2713 :param obj retry_strategy: (optional) 2714 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2715 2716 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2717 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2718 2719 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2720 2721 :return: A :class:`~oci.response.Response` object with data of type None 2722 :rtype: :class:`~oci.response.Response` 2723 2724 :example: 2725 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_attribute.py.html>`__ to see an example of how to use delete_attribute API. 2726 """ 2727 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/attributes/{attributeKey}" 2728 method = "DELETE" 2729 2730 # Don't accept unknown kwargs 2731 expected_kwargs = [ 2732 "retry_strategy", 2733 "if_match", 2734 "opc_request_id" 2735 ] 2736 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2737 if extra_kwargs: 2738 raise ValueError( 2739 "delete_attribute got unknown kwargs: {!r}".format(extra_kwargs)) 2740 2741 path_params = { 2742 "catalogId": catalog_id, 2743 "dataAssetKey": data_asset_key, 2744 "entityKey": entity_key, 2745 "attributeKey": attribute_key 2746 } 2747 2748 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2749 2750 for (k, v) in six.iteritems(path_params): 2751 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2752 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2753 2754 header_params = { 2755 "accept": "application/json", 2756 "content-type": "application/json", 2757 "if-match": kwargs.get("if_match", missing), 2758 "opc-request-id": kwargs.get("opc_request_id", missing) 2759 } 2760 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2761 2762 retry_strategy = self.base_client.get_preferred_retry_strategy( 2763 operation_retry_strategy=kwargs.get('retry_strategy'), 2764 client_retry_strategy=self.retry_strategy 2765 ) 2766 2767 if retry_strategy: 2768 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2769 self.base_client.add_opc_client_retries_header(header_params) 2770 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2771 return retry_strategy.make_retrying_call( 2772 self.base_client.call_api, 2773 resource_path=resource_path, 2774 method=method, 2775 path_params=path_params, 2776 header_params=header_params) 2777 else: 2778 return self.base_client.call_api( 2779 resource_path=resource_path, 2780 method=method, 2781 path_params=path_params, 2782 header_params=header_params) 2783 2784 def delete_attribute_tag(self, catalog_id, data_asset_key, entity_key, attribute_key, tag_key, **kwargs): 2785 """ 2786 Deletes a specific entity attribute tag. 2787 2788 2789 :param str catalog_id: (required) 2790 Unique catalog identifier. 2791 2792 :param str data_asset_key: (required) 2793 Unique data asset key. 2794 2795 :param str entity_key: (required) 2796 Unique entity key. 2797 2798 :param str attribute_key: (required) 2799 Unique attribute key. 2800 2801 :param str tag_key: (required) 2802 Unique tag key. 2803 2804 :param str if_match: (optional) 2805 For optimistic concurrency control. In the PUT or DELETE call 2806 for a resource, set the `if-match` parameter to the value of the 2807 etag from a previous GET or POST response for that resource. 2808 The resource will be updated or deleted only if the etag you 2809 provide matches the resource's current etag value. 2810 2811 :param str opc_request_id: (optional) 2812 The client request ID for tracing. 2813 2814 :param obj retry_strategy: (optional) 2815 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2816 2817 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2818 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2819 2820 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2821 2822 :return: A :class:`~oci.response.Response` object with data of type None 2823 :rtype: :class:`~oci.response.Response` 2824 2825 :example: 2826 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_attribute_tag.py.html>`__ to see an example of how to use delete_attribute_tag API. 2827 """ 2828 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/attributes/{attributeKey}/tags/{tagKey}" 2829 method = "DELETE" 2830 2831 # Don't accept unknown kwargs 2832 expected_kwargs = [ 2833 "retry_strategy", 2834 "if_match", 2835 "opc_request_id" 2836 ] 2837 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2838 if extra_kwargs: 2839 raise ValueError( 2840 "delete_attribute_tag got unknown kwargs: {!r}".format(extra_kwargs)) 2841 2842 path_params = { 2843 "catalogId": catalog_id, 2844 "dataAssetKey": data_asset_key, 2845 "entityKey": entity_key, 2846 "attributeKey": attribute_key, 2847 "tagKey": tag_key 2848 } 2849 2850 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2851 2852 for (k, v) in six.iteritems(path_params): 2853 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2854 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2855 2856 header_params = { 2857 "accept": "application/json", 2858 "content-type": "application/json", 2859 "if-match": kwargs.get("if_match", missing), 2860 "opc-request-id": kwargs.get("opc_request_id", missing) 2861 } 2862 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2863 2864 retry_strategy = self.base_client.get_preferred_retry_strategy( 2865 operation_retry_strategy=kwargs.get('retry_strategy'), 2866 client_retry_strategy=self.retry_strategy 2867 ) 2868 2869 if retry_strategy: 2870 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2871 self.base_client.add_opc_client_retries_header(header_params) 2872 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2873 return retry_strategy.make_retrying_call( 2874 self.base_client.call_api, 2875 resource_path=resource_path, 2876 method=method, 2877 path_params=path_params, 2878 header_params=header_params) 2879 else: 2880 return self.base_client.call_api( 2881 resource_path=resource_path, 2882 method=method, 2883 path_params=path_params, 2884 header_params=header_params) 2885 2886 def delete_catalog(self, catalog_id, **kwargs): 2887 """ 2888 Deletes a data catalog resource by identifier. 2889 2890 2891 :param str catalog_id: (required) 2892 Unique catalog identifier. 2893 2894 :param str if_match: (optional) 2895 For optimistic concurrency control. In the PUT or DELETE call 2896 for a resource, set the `if-match` parameter to the value of the 2897 etag from a previous GET or POST response for that resource. 2898 The resource will be updated or deleted only if the etag you 2899 provide matches the resource's current etag value. 2900 2901 :param str opc_request_id: (optional) 2902 The client request ID for tracing. 2903 2904 :param obj retry_strategy: (optional) 2905 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2906 2907 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2908 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2909 2910 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2911 2912 :return: A :class:`~oci.response.Response` object with data of type None 2913 :rtype: :class:`~oci.response.Response` 2914 2915 :example: 2916 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_catalog.py.html>`__ to see an example of how to use delete_catalog API. 2917 """ 2918 resource_path = "/catalogs/{catalogId}" 2919 method = "DELETE" 2920 2921 # Don't accept unknown kwargs 2922 expected_kwargs = [ 2923 "retry_strategy", 2924 "if_match", 2925 "opc_request_id" 2926 ] 2927 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 2928 if extra_kwargs: 2929 raise ValueError( 2930 "delete_catalog got unknown kwargs: {!r}".format(extra_kwargs)) 2931 2932 path_params = { 2933 "catalogId": catalog_id 2934 } 2935 2936 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 2937 2938 for (k, v) in six.iteritems(path_params): 2939 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 2940 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 2941 2942 header_params = { 2943 "accept": "application/json", 2944 "content-type": "application/json", 2945 "if-match": kwargs.get("if_match", missing), 2946 "opc-request-id": kwargs.get("opc_request_id", missing) 2947 } 2948 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 2949 2950 retry_strategy = self.base_client.get_preferred_retry_strategy( 2951 operation_retry_strategy=kwargs.get('retry_strategy'), 2952 client_retry_strategy=self.retry_strategy 2953 ) 2954 2955 if retry_strategy: 2956 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 2957 self.base_client.add_opc_client_retries_header(header_params) 2958 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 2959 return retry_strategy.make_retrying_call( 2960 self.base_client.call_api, 2961 resource_path=resource_path, 2962 method=method, 2963 path_params=path_params, 2964 header_params=header_params) 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 2972 def delete_catalog_private_endpoint(self, catalog_private_endpoint_id, **kwargs): 2973 """ 2974 Deletes a private reverse connection endpoint by identifier. 2975 2976 2977 :param str catalog_private_endpoint_id: (required) 2978 Unique private reverse connection identifier. 2979 2980 :param str if_match: (optional) 2981 For optimistic concurrency control. In the PUT or DELETE call 2982 for a resource, set the `if-match` parameter to the value of the 2983 etag from a previous GET or POST response for that resource. 2984 The resource will be updated or deleted only if the etag you 2985 provide matches the resource's current etag value. 2986 2987 :param str opc_request_id: (optional) 2988 The client request ID for tracing. 2989 2990 :param obj retry_strategy: (optional) 2991 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 2992 2993 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 2994 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 2995 2996 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 2997 2998 :return: A :class:`~oci.response.Response` object with data of type None 2999 :rtype: :class:`~oci.response.Response` 3000 3001 :example: 3002 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_catalog_private_endpoint.py.html>`__ to see an example of how to use delete_catalog_private_endpoint API. 3003 """ 3004 resource_path = "/catalogPrivateEndpoints/{catalogPrivateEndpointId}" 3005 method = "DELETE" 3006 3007 # Don't accept unknown kwargs 3008 expected_kwargs = [ 3009 "retry_strategy", 3010 "if_match", 3011 "opc_request_id" 3012 ] 3013 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3014 if extra_kwargs: 3015 raise ValueError( 3016 "delete_catalog_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) 3017 3018 path_params = { 3019 "catalogPrivateEndpointId": catalog_private_endpoint_id 3020 } 3021 3022 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3023 3024 for (k, v) in six.iteritems(path_params): 3025 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3026 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3027 3028 header_params = { 3029 "accept": "application/json", 3030 "content-type": "application/json", 3031 "if-match": kwargs.get("if_match", missing), 3032 "opc-request-id": kwargs.get("opc_request_id", missing) 3033 } 3034 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3035 3036 retry_strategy = self.base_client.get_preferred_retry_strategy( 3037 operation_retry_strategy=kwargs.get('retry_strategy'), 3038 client_retry_strategy=self.retry_strategy 3039 ) 3040 3041 if retry_strategy: 3042 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3043 self.base_client.add_opc_client_retries_header(header_params) 3044 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3045 return retry_strategy.make_retrying_call( 3046 self.base_client.call_api, 3047 resource_path=resource_path, 3048 method=method, 3049 path_params=path_params, 3050 header_params=header_params) 3051 else: 3052 return self.base_client.call_api( 3053 resource_path=resource_path, 3054 method=method, 3055 path_params=path_params, 3056 header_params=header_params) 3057 3058 def delete_connection(self, catalog_id, data_asset_key, connection_key, **kwargs): 3059 """ 3060 Deletes a specific connection of a data asset. 3061 3062 3063 :param str catalog_id: (required) 3064 Unique catalog identifier. 3065 3066 :param str data_asset_key: (required) 3067 Unique data asset key. 3068 3069 :param str connection_key: (required) 3070 Unique connection key. 3071 3072 :param str if_match: (optional) 3073 For optimistic concurrency control. In the PUT or DELETE call 3074 for a resource, set the `if-match` parameter to the value of the 3075 etag from a previous GET or POST response for that resource. 3076 The resource will be updated or deleted only if the etag you 3077 provide matches the resource's current etag value. 3078 3079 :param str opc_request_id: (optional) 3080 The client request ID for tracing. 3081 3082 :param obj retry_strategy: (optional) 3083 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3084 3085 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3086 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3087 3088 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3089 3090 :return: A :class:`~oci.response.Response` object with data of type None 3091 :rtype: :class:`~oci.response.Response` 3092 3093 :example: 3094 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_connection.py.html>`__ to see an example of how to use delete_connection API. 3095 """ 3096 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/connections/{connectionKey}" 3097 method = "DELETE" 3098 3099 # Don't accept unknown kwargs 3100 expected_kwargs = [ 3101 "retry_strategy", 3102 "if_match", 3103 "opc_request_id" 3104 ] 3105 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3106 if extra_kwargs: 3107 raise ValueError( 3108 "delete_connection got unknown kwargs: {!r}".format(extra_kwargs)) 3109 3110 path_params = { 3111 "catalogId": catalog_id, 3112 "dataAssetKey": data_asset_key, 3113 "connectionKey": connection_key 3114 } 3115 3116 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3117 3118 for (k, v) in six.iteritems(path_params): 3119 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3120 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3121 3122 header_params = { 3123 "accept": "application/json", 3124 "content-type": "application/json", 3125 "if-match": kwargs.get("if_match", missing), 3126 "opc-request-id": kwargs.get("opc_request_id", missing) 3127 } 3128 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3129 3130 retry_strategy = self.base_client.get_preferred_retry_strategy( 3131 operation_retry_strategy=kwargs.get('retry_strategy'), 3132 client_retry_strategy=self.retry_strategy 3133 ) 3134 3135 if retry_strategy: 3136 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3137 self.base_client.add_opc_client_retries_header(header_params) 3138 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3139 return retry_strategy.make_retrying_call( 3140 self.base_client.call_api, 3141 resource_path=resource_path, 3142 method=method, 3143 path_params=path_params, 3144 header_params=header_params) 3145 else: 3146 return self.base_client.call_api( 3147 resource_path=resource_path, 3148 method=method, 3149 path_params=path_params, 3150 header_params=header_params) 3151 3152 def delete_custom_property(self, catalog_id, namespace_id, custom_property_key, **kwargs): 3153 """ 3154 Deletes a specific custom property identified by it's key. 3155 3156 3157 :param str catalog_id: (required) 3158 Unique catalog identifier. 3159 3160 :param str namespace_id: (required) 3161 Unique namespace identifier. 3162 3163 :param str custom_property_key: (required) 3164 Unique Custom Property key 3165 3166 :param str if_match: (optional) 3167 For optimistic concurrency control. In the PUT or DELETE call 3168 for a resource, set the `if-match` parameter to the value of the 3169 etag from a previous GET or POST response for that resource. 3170 The resource will be updated or deleted only if the etag you 3171 provide matches the resource's current etag value. 3172 3173 :param str opc_request_id: (optional) 3174 The client request ID for tracing. 3175 3176 :param obj retry_strategy: (optional) 3177 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3178 3179 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3180 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3181 3182 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3183 3184 :return: A :class:`~oci.response.Response` object with data of type None 3185 :rtype: :class:`~oci.response.Response` 3186 3187 :example: 3188 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_custom_property.py.html>`__ to see an example of how to use delete_custom_property API. 3189 """ 3190 resource_path = "/catalogs/{catalogId}/namespaces/{namespaceId}/customProperties/{customPropertyKey}" 3191 method = "DELETE" 3192 3193 # Don't accept unknown kwargs 3194 expected_kwargs = [ 3195 "retry_strategy", 3196 "if_match", 3197 "opc_request_id" 3198 ] 3199 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3200 if extra_kwargs: 3201 raise ValueError( 3202 "delete_custom_property got unknown kwargs: {!r}".format(extra_kwargs)) 3203 3204 path_params = { 3205 "catalogId": catalog_id, 3206 "namespaceId": namespace_id, 3207 "customPropertyKey": custom_property_key 3208 } 3209 3210 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3211 3212 for (k, v) in six.iteritems(path_params): 3213 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3214 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3215 3216 header_params = { 3217 "accept": "application/json", 3218 "content-type": "application/json", 3219 "if-match": kwargs.get("if_match", missing), 3220 "opc-request-id": kwargs.get("opc_request_id", missing) 3221 } 3222 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3223 3224 retry_strategy = self.base_client.get_preferred_retry_strategy( 3225 operation_retry_strategy=kwargs.get('retry_strategy'), 3226 client_retry_strategy=self.retry_strategy 3227 ) 3228 3229 if retry_strategy: 3230 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3231 self.base_client.add_opc_client_retries_header(header_params) 3232 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3233 return retry_strategy.make_retrying_call( 3234 self.base_client.call_api, 3235 resource_path=resource_path, 3236 method=method, 3237 path_params=path_params, 3238 header_params=header_params) 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 3246 def delete_data_asset(self, catalog_id, data_asset_key, **kwargs): 3247 """ 3248 Deletes a specific data asset identified by it's key. 3249 3250 3251 :param str catalog_id: (required) 3252 Unique catalog identifier. 3253 3254 :param str data_asset_key: (required) 3255 Unique data asset key. 3256 3257 :param str if_match: (optional) 3258 For optimistic concurrency control. In the PUT or DELETE call 3259 for a resource, set the `if-match` parameter to the value of the 3260 etag from a previous GET or POST response for that resource. 3261 The resource will be updated or deleted only if the etag you 3262 provide matches the resource's current etag value. 3263 3264 :param str opc_request_id: (optional) 3265 The client request ID for tracing. 3266 3267 :param obj retry_strategy: (optional) 3268 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3269 3270 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3271 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3272 3273 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3274 3275 :return: A :class:`~oci.response.Response` object with data of type None 3276 :rtype: :class:`~oci.response.Response` 3277 3278 :example: 3279 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_data_asset.py.html>`__ to see an example of how to use delete_data_asset API. 3280 """ 3281 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}" 3282 method = "DELETE" 3283 3284 # Don't accept unknown kwargs 3285 expected_kwargs = [ 3286 "retry_strategy", 3287 "if_match", 3288 "opc_request_id" 3289 ] 3290 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3291 if extra_kwargs: 3292 raise ValueError( 3293 "delete_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) 3294 3295 path_params = { 3296 "catalogId": catalog_id, 3297 "dataAssetKey": data_asset_key 3298 } 3299 3300 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3301 3302 for (k, v) in six.iteritems(path_params): 3303 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3304 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3305 3306 header_params = { 3307 "accept": "application/json", 3308 "content-type": "application/json", 3309 "if-match": kwargs.get("if_match", missing), 3310 "opc-request-id": kwargs.get("opc_request_id", missing) 3311 } 3312 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3313 3314 retry_strategy = self.base_client.get_preferred_retry_strategy( 3315 operation_retry_strategy=kwargs.get('retry_strategy'), 3316 client_retry_strategy=self.retry_strategy 3317 ) 3318 3319 if retry_strategy: 3320 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3321 self.base_client.add_opc_client_retries_header(header_params) 3322 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3323 return retry_strategy.make_retrying_call( 3324 self.base_client.call_api, 3325 resource_path=resource_path, 3326 method=method, 3327 path_params=path_params, 3328 header_params=header_params) 3329 else: 3330 return self.base_client.call_api( 3331 resource_path=resource_path, 3332 method=method, 3333 path_params=path_params, 3334 header_params=header_params) 3335 3336 def delete_data_asset_tag(self, catalog_id, data_asset_key, tag_key, **kwargs): 3337 """ 3338 Deletes a specific data asset tag. 3339 3340 3341 :param str catalog_id: (required) 3342 Unique catalog identifier. 3343 3344 :param str data_asset_key: (required) 3345 Unique data asset key. 3346 3347 :param str tag_key: (required) 3348 Unique tag key. 3349 3350 :param str if_match: (optional) 3351 For optimistic concurrency control. In the PUT or DELETE call 3352 for a resource, set the `if-match` parameter to the value of the 3353 etag from a previous GET or POST response for that resource. 3354 The resource will be updated or deleted only if the etag you 3355 provide matches the resource's current etag value. 3356 3357 :param str opc_request_id: (optional) 3358 The client request ID for tracing. 3359 3360 :param obj retry_strategy: (optional) 3361 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3362 3363 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3364 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3365 3366 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3367 3368 :return: A :class:`~oci.response.Response` object with data of type None 3369 :rtype: :class:`~oci.response.Response` 3370 3371 :example: 3372 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_data_asset_tag.py.html>`__ to see an example of how to use delete_data_asset_tag API. 3373 """ 3374 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/tags/{tagKey}" 3375 method = "DELETE" 3376 3377 # Don't accept unknown kwargs 3378 expected_kwargs = [ 3379 "retry_strategy", 3380 "if_match", 3381 "opc_request_id" 3382 ] 3383 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3384 if extra_kwargs: 3385 raise ValueError( 3386 "delete_data_asset_tag got unknown kwargs: {!r}".format(extra_kwargs)) 3387 3388 path_params = { 3389 "catalogId": catalog_id, 3390 "dataAssetKey": data_asset_key, 3391 "tagKey": tag_key 3392 } 3393 3394 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3395 3396 for (k, v) in six.iteritems(path_params): 3397 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3398 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3399 3400 header_params = { 3401 "accept": "application/json", 3402 "content-type": "application/json", 3403 "if-match": kwargs.get("if_match", missing), 3404 "opc-request-id": kwargs.get("opc_request_id", missing) 3405 } 3406 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3407 3408 retry_strategy = self.base_client.get_preferred_retry_strategy( 3409 operation_retry_strategy=kwargs.get('retry_strategy'), 3410 client_retry_strategy=self.retry_strategy 3411 ) 3412 3413 if retry_strategy: 3414 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3415 self.base_client.add_opc_client_retries_header(header_params) 3416 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3417 return retry_strategy.make_retrying_call( 3418 self.base_client.call_api, 3419 resource_path=resource_path, 3420 method=method, 3421 path_params=path_params, 3422 header_params=header_params) 3423 else: 3424 return self.base_client.call_api( 3425 resource_path=resource_path, 3426 method=method, 3427 path_params=path_params, 3428 header_params=header_params) 3429 3430 def delete_entity(self, catalog_id, data_asset_key, entity_key, **kwargs): 3431 """ 3432 Deletes a specific data entity. 3433 3434 3435 :param str catalog_id: (required) 3436 Unique catalog identifier. 3437 3438 :param str data_asset_key: (required) 3439 Unique data asset key. 3440 3441 :param str entity_key: (required) 3442 Unique entity key. 3443 3444 :param str if_match: (optional) 3445 For optimistic concurrency control. In the PUT or DELETE call 3446 for a resource, set the `if-match` parameter to the value of the 3447 etag from a previous GET or POST response for that resource. 3448 The resource will be updated or deleted only if the etag you 3449 provide matches the resource's current etag value. 3450 3451 :param str opc_request_id: (optional) 3452 The client request ID for tracing. 3453 3454 :param obj retry_strategy: (optional) 3455 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3456 3457 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3458 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3459 3460 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3461 3462 :return: A :class:`~oci.response.Response` object with data of type None 3463 :rtype: :class:`~oci.response.Response` 3464 3465 :example: 3466 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_entity.py.html>`__ to see an example of how to use delete_entity API. 3467 """ 3468 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}" 3469 method = "DELETE" 3470 3471 # Don't accept unknown kwargs 3472 expected_kwargs = [ 3473 "retry_strategy", 3474 "if_match", 3475 "opc_request_id" 3476 ] 3477 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3478 if extra_kwargs: 3479 raise ValueError( 3480 "delete_entity got unknown kwargs: {!r}".format(extra_kwargs)) 3481 3482 path_params = { 3483 "catalogId": catalog_id, 3484 "dataAssetKey": data_asset_key, 3485 "entityKey": entity_key 3486 } 3487 3488 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3489 3490 for (k, v) in six.iteritems(path_params): 3491 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3492 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3493 3494 header_params = { 3495 "accept": "application/json", 3496 "content-type": "application/json", 3497 "if-match": kwargs.get("if_match", missing), 3498 "opc-request-id": kwargs.get("opc_request_id", missing) 3499 } 3500 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3501 3502 retry_strategy = self.base_client.get_preferred_retry_strategy( 3503 operation_retry_strategy=kwargs.get('retry_strategy'), 3504 client_retry_strategy=self.retry_strategy 3505 ) 3506 3507 if retry_strategy: 3508 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3509 self.base_client.add_opc_client_retries_header(header_params) 3510 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3511 return retry_strategy.make_retrying_call( 3512 self.base_client.call_api, 3513 resource_path=resource_path, 3514 method=method, 3515 path_params=path_params, 3516 header_params=header_params) 3517 else: 3518 return self.base_client.call_api( 3519 resource_path=resource_path, 3520 method=method, 3521 path_params=path_params, 3522 header_params=header_params) 3523 3524 def delete_entity_tag(self, catalog_id, data_asset_key, entity_key, tag_key, **kwargs): 3525 """ 3526 Deletes a specific entity tag. 3527 3528 3529 :param str catalog_id: (required) 3530 Unique catalog identifier. 3531 3532 :param str data_asset_key: (required) 3533 Unique data asset key. 3534 3535 :param str entity_key: (required) 3536 Unique entity key. 3537 3538 :param str tag_key: (required) 3539 Unique tag key. 3540 3541 :param str if_match: (optional) 3542 For optimistic concurrency control. In the PUT or DELETE call 3543 for a resource, set the `if-match` parameter to the value of the 3544 etag from a previous GET or POST response for that resource. 3545 The resource will be updated or deleted only if the etag you 3546 provide matches the resource's current etag value. 3547 3548 :param str opc_request_id: (optional) 3549 The client request ID for tracing. 3550 3551 :param obj retry_strategy: (optional) 3552 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3553 3554 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3555 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3556 3557 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3558 3559 :return: A :class:`~oci.response.Response` object with data of type None 3560 :rtype: :class:`~oci.response.Response` 3561 3562 :example: 3563 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_entity_tag.py.html>`__ to see an example of how to use delete_entity_tag API. 3564 """ 3565 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/tags/{tagKey}" 3566 method = "DELETE" 3567 3568 # Don't accept unknown kwargs 3569 expected_kwargs = [ 3570 "retry_strategy", 3571 "if_match", 3572 "opc_request_id" 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 "delete_entity_tag got unknown kwargs: {!r}".format(extra_kwargs)) 3578 3579 path_params = { 3580 "catalogId": catalog_id, 3581 "dataAssetKey": data_asset_key, 3582 "entityKey": entity_key, 3583 "tagKey": tag_key 3584 } 3585 3586 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3587 3588 for (k, v) in six.iteritems(path_params): 3589 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3590 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3591 3592 header_params = { 3593 "accept": "application/json", 3594 "content-type": "application/json", 3595 "if-match": kwargs.get("if_match", missing), 3596 "opc-request-id": kwargs.get("opc_request_id", missing) 3597 } 3598 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3599 3600 retry_strategy = self.base_client.get_preferred_retry_strategy( 3601 operation_retry_strategy=kwargs.get('retry_strategy'), 3602 client_retry_strategy=self.retry_strategy 3603 ) 3604 3605 if retry_strategy: 3606 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3607 self.base_client.add_opc_client_retries_header(header_params) 3608 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3609 return retry_strategy.make_retrying_call( 3610 self.base_client.call_api, 3611 resource_path=resource_path, 3612 method=method, 3613 path_params=path_params, 3614 header_params=header_params) 3615 else: 3616 return self.base_client.call_api( 3617 resource_path=resource_path, 3618 method=method, 3619 path_params=path_params, 3620 header_params=header_params) 3621 3622 def delete_folder(self, catalog_id, data_asset_key, folder_key, **kwargs): 3623 """ 3624 Deletes a specific folder of a data asset identified by it's key. 3625 3626 3627 :param str catalog_id: (required) 3628 Unique catalog identifier. 3629 3630 :param str data_asset_key: (required) 3631 Unique data asset key. 3632 3633 :param str folder_key: (required) 3634 Unique folder key. 3635 3636 :param str if_match: (optional) 3637 For optimistic concurrency control. In the PUT or DELETE call 3638 for a resource, set the `if-match` parameter to the value of the 3639 etag from a previous GET or POST response for that resource. 3640 The resource will be updated or deleted only if the etag you 3641 provide matches the resource's current etag value. 3642 3643 :param str opc_request_id: (optional) 3644 The client request ID for tracing. 3645 3646 :param obj retry_strategy: (optional) 3647 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3648 3649 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3650 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3651 3652 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3653 3654 :return: A :class:`~oci.response.Response` object with data of type None 3655 :rtype: :class:`~oci.response.Response` 3656 3657 :example: 3658 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_folder.py.html>`__ to see an example of how to use delete_folder API. 3659 """ 3660 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/folders/{folderKey}" 3661 method = "DELETE" 3662 3663 # Don't accept unknown kwargs 3664 expected_kwargs = [ 3665 "retry_strategy", 3666 "if_match", 3667 "opc_request_id" 3668 ] 3669 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3670 if extra_kwargs: 3671 raise ValueError( 3672 "delete_folder got unknown kwargs: {!r}".format(extra_kwargs)) 3673 3674 path_params = { 3675 "catalogId": catalog_id, 3676 "dataAssetKey": data_asset_key, 3677 "folderKey": folder_key 3678 } 3679 3680 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3681 3682 for (k, v) in six.iteritems(path_params): 3683 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3684 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3685 3686 header_params = { 3687 "accept": "application/json", 3688 "content-type": "application/json", 3689 "if-match": kwargs.get("if_match", missing), 3690 "opc-request-id": kwargs.get("opc_request_id", missing) 3691 } 3692 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3693 3694 retry_strategy = self.base_client.get_preferred_retry_strategy( 3695 operation_retry_strategy=kwargs.get('retry_strategy'), 3696 client_retry_strategy=self.retry_strategy 3697 ) 3698 3699 if retry_strategy: 3700 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3701 self.base_client.add_opc_client_retries_header(header_params) 3702 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3703 return retry_strategy.make_retrying_call( 3704 self.base_client.call_api, 3705 resource_path=resource_path, 3706 method=method, 3707 path_params=path_params, 3708 header_params=header_params) 3709 else: 3710 return self.base_client.call_api( 3711 resource_path=resource_path, 3712 method=method, 3713 path_params=path_params, 3714 header_params=header_params) 3715 3716 def delete_folder_tag(self, catalog_id, data_asset_key, folder_key, tag_key, **kwargs): 3717 """ 3718 Deletes a specific folder tag. 3719 3720 3721 :param str catalog_id: (required) 3722 Unique catalog identifier. 3723 3724 :param str data_asset_key: (required) 3725 Unique data asset key. 3726 3727 :param str folder_key: (required) 3728 Unique folder key. 3729 3730 :param str tag_key: (required) 3731 Unique tag key. 3732 3733 :param str if_match: (optional) 3734 For optimistic concurrency control. In the PUT or DELETE call 3735 for a resource, set the `if-match` parameter to the value of the 3736 etag from a previous GET or POST response for that resource. 3737 The resource will be updated or deleted only if the etag you 3738 provide matches the resource's current etag value. 3739 3740 :param str opc_request_id: (optional) 3741 The client request ID for tracing. 3742 3743 :param obj retry_strategy: (optional) 3744 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3745 3746 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3747 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3748 3749 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3750 3751 :return: A :class:`~oci.response.Response` object with data of type None 3752 :rtype: :class:`~oci.response.Response` 3753 3754 :example: 3755 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_folder_tag.py.html>`__ to see an example of how to use delete_folder_tag API. 3756 """ 3757 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/folders/{folderKey}/tags/{tagKey}" 3758 method = "DELETE" 3759 3760 # Don't accept unknown kwargs 3761 expected_kwargs = [ 3762 "retry_strategy", 3763 "if_match", 3764 "opc_request_id" 3765 ] 3766 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3767 if extra_kwargs: 3768 raise ValueError( 3769 "delete_folder_tag got unknown kwargs: {!r}".format(extra_kwargs)) 3770 3771 path_params = { 3772 "catalogId": catalog_id, 3773 "dataAssetKey": data_asset_key, 3774 "folderKey": folder_key, 3775 "tagKey": tag_key 3776 } 3777 3778 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3779 3780 for (k, v) in six.iteritems(path_params): 3781 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3782 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3783 3784 header_params = { 3785 "accept": "application/json", 3786 "content-type": "application/json", 3787 "if-match": kwargs.get("if_match", missing), 3788 "opc-request-id": kwargs.get("opc_request_id", missing) 3789 } 3790 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3791 3792 retry_strategy = self.base_client.get_preferred_retry_strategy( 3793 operation_retry_strategy=kwargs.get('retry_strategy'), 3794 client_retry_strategy=self.retry_strategy 3795 ) 3796 3797 if retry_strategy: 3798 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3799 self.base_client.add_opc_client_retries_header(header_params) 3800 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3801 return retry_strategy.make_retrying_call( 3802 self.base_client.call_api, 3803 resource_path=resource_path, 3804 method=method, 3805 path_params=path_params, 3806 header_params=header_params) 3807 else: 3808 return self.base_client.call_api( 3809 resource_path=resource_path, 3810 method=method, 3811 path_params=path_params, 3812 header_params=header_params) 3813 3814 def delete_glossary(self, catalog_id, glossary_key, **kwargs): 3815 """ 3816 Deletes a specific glossary identified by it's key. 3817 3818 3819 :param str catalog_id: (required) 3820 Unique catalog identifier. 3821 3822 :param str glossary_key: (required) 3823 Unique glossary key. 3824 3825 :param str if_match: (optional) 3826 For optimistic concurrency control. In the PUT or DELETE call 3827 for a resource, set the `if-match` parameter to the value of the 3828 etag from a previous GET or POST response for that resource. 3829 The resource will be updated or deleted only if the etag you 3830 provide matches the resource's current etag value. 3831 3832 :param str opc_request_id: (optional) 3833 The client request ID for tracing. 3834 3835 :param obj retry_strategy: (optional) 3836 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3837 3838 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3839 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3840 3841 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3842 3843 :return: A :class:`~oci.response.Response` object with data of type None 3844 :rtype: :class:`~oci.response.Response` 3845 3846 :example: 3847 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_glossary.py.html>`__ to see an example of how to use delete_glossary API. 3848 """ 3849 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}" 3850 method = "DELETE" 3851 3852 # Don't accept unknown kwargs 3853 expected_kwargs = [ 3854 "retry_strategy", 3855 "if_match", 3856 "opc_request_id" 3857 ] 3858 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3859 if extra_kwargs: 3860 raise ValueError( 3861 "delete_glossary got unknown kwargs: {!r}".format(extra_kwargs)) 3862 3863 path_params = { 3864 "catalogId": catalog_id, 3865 "glossaryKey": glossary_key 3866 } 3867 3868 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3869 3870 for (k, v) in six.iteritems(path_params): 3871 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3872 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3873 3874 header_params = { 3875 "accept": "application/json", 3876 "content-type": "application/json", 3877 "if-match": kwargs.get("if_match", missing), 3878 "opc-request-id": kwargs.get("opc_request_id", missing) 3879 } 3880 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3881 3882 retry_strategy = self.base_client.get_preferred_retry_strategy( 3883 operation_retry_strategy=kwargs.get('retry_strategy'), 3884 client_retry_strategy=self.retry_strategy 3885 ) 3886 3887 if retry_strategy: 3888 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3889 self.base_client.add_opc_client_retries_header(header_params) 3890 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3891 return retry_strategy.make_retrying_call( 3892 self.base_client.call_api, 3893 resource_path=resource_path, 3894 method=method, 3895 path_params=path_params, 3896 header_params=header_params) 3897 else: 3898 return self.base_client.call_api( 3899 resource_path=resource_path, 3900 method=method, 3901 path_params=path_params, 3902 header_params=header_params) 3903 3904 def delete_job(self, catalog_id, job_key, **kwargs): 3905 """ 3906 Deletes a specific job identified by it's key. 3907 3908 3909 :param str catalog_id: (required) 3910 Unique catalog identifier. 3911 3912 :param str job_key: (required) 3913 Unique job key. 3914 3915 :param str if_match: (optional) 3916 For optimistic concurrency control. In the PUT or DELETE call 3917 for a resource, set the `if-match` parameter to the value of the 3918 etag from a previous GET or POST response for that resource. 3919 The resource will be updated or deleted only if the etag you 3920 provide matches the resource's current etag value. 3921 3922 :param str opc_request_id: (optional) 3923 The client request ID for tracing. 3924 3925 :param obj retry_strategy: (optional) 3926 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 3927 3928 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 3929 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 3930 3931 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 3932 3933 :return: A :class:`~oci.response.Response` object with data of type None 3934 :rtype: :class:`~oci.response.Response` 3935 3936 :example: 3937 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_job.py.html>`__ to see an example of how to use delete_job API. 3938 """ 3939 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}" 3940 method = "DELETE" 3941 3942 # Don't accept unknown kwargs 3943 expected_kwargs = [ 3944 "retry_strategy", 3945 "if_match", 3946 "opc_request_id" 3947 ] 3948 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 3949 if extra_kwargs: 3950 raise ValueError( 3951 "delete_job got unknown kwargs: {!r}".format(extra_kwargs)) 3952 3953 path_params = { 3954 "catalogId": catalog_id, 3955 "jobKey": job_key 3956 } 3957 3958 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 3959 3960 for (k, v) in six.iteritems(path_params): 3961 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 3962 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 3963 3964 header_params = { 3965 "accept": "application/json", 3966 "content-type": "application/json", 3967 "if-match": kwargs.get("if_match", missing), 3968 "opc-request-id": kwargs.get("opc_request_id", missing) 3969 } 3970 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 3971 3972 retry_strategy = self.base_client.get_preferred_retry_strategy( 3973 operation_retry_strategy=kwargs.get('retry_strategy'), 3974 client_retry_strategy=self.retry_strategy 3975 ) 3976 3977 if retry_strategy: 3978 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 3979 self.base_client.add_opc_client_retries_header(header_params) 3980 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 3981 return retry_strategy.make_retrying_call( 3982 self.base_client.call_api, 3983 resource_path=resource_path, 3984 method=method, 3985 path_params=path_params, 3986 header_params=header_params) 3987 else: 3988 return self.base_client.call_api( 3989 resource_path=resource_path, 3990 method=method, 3991 path_params=path_params, 3992 header_params=header_params) 3993 3994 def delete_job_definition(self, catalog_id, job_definition_key, **kwargs): 3995 """ 3996 Deletes a specific job definition identified by it's key. 3997 3998 3999 :param str catalog_id: (required) 4000 Unique catalog identifier. 4001 4002 :param str job_definition_key: (required) 4003 Unique job definition key. 4004 4005 :param str if_match: (optional) 4006 For optimistic concurrency control. In the PUT or DELETE call 4007 for a resource, set the `if-match` parameter to the value of the 4008 etag from a previous GET or POST response for that resource. 4009 The resource will be updated or deleted only if the etag you 4010 provide matches the resource's current etag value. 4011 4012 :param str opc_request_id: (optional) 4013 The client request ID for tracing. 4014 4015 :param obj retry_strategy: (optional) 4016 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4017 4018 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 4019 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4020 4021 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4022 4023 :return: A :class:`~oci.response.Response` object with data of type None 4024 :rtype: :class:`~oci.response.Response` 4025 4026 :example: 4027 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_job_definition.py.html>`__ to see an example of how to use delete_job_definition API. 4028 """ 4029 resource_path = "/catalogs/{catalogId}/jobDefinitions/{jobDefinitionKey}" 4030 method = "DELETE" 4031 4032 # Don't accept unknown kwargs 4033 expected_kwargs = [ 4034 "retry_strategy", 4035 "if_match", 4036 "opc_request_id" 4037 ] 4038 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4039 if extra_kwargs: 4040 raise ValueError( 4041 "delete_job_definition got unknown kwargs: {!r}".format(extra_kwargs)) 4042 4043 path_params = { 4044 "catalogId": catalog_id, 4045 "jobDefinitionKey": job_definition_key 4046 } 4047 4048 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4049 4050 for (k, v) in six.iteritems(path_params): 4051 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4052 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4053 4054 header_params = { 4055 "accept": "application/json", 4056 "content-type": "application/json", 4057 "if-match": kwargs.get("if_match", missing), 4058 "opc-request-id": kwargs.get("opc_request_id", missing) 4059 } 4060 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4061 4062 retry_strategy = self.base_client.get_preferred_retry_strategy( 4063 operation_retry_strategy=kwargs.get('retry_strategy'), 4064 client_retry_strategy=self.retry_strategy 4065 ) 4066 4067 if retry_strategy: 4068 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4069 self.base_client.add_opc_client_retries_header(header_params) 4070 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4071 return retry_strategy.make_retrying_call( 4072 self.base_client.call_api, 4073 resource_path=resource_path, 4074 method=method, 4075 path_params=path_params, 4076 header_params=header_params) 4077 else: 4078 return self.base_client.call_api( 4079 resource_path=resource_path, 4080 method=method, 4081 path_params=path_params, 4082 header_params=header_params) 4083 4084 def delete_metastore(self, metastore_id, **kwargs): 4085 """ 4086 Deletes a metastore resource by identifier. 4087 4088 4089 :param str metastore_id: (required) 4090 The metastore's OCID. 4091 4092 :param str if_match: (optional) 4093 For optimistic concurrency control. In the PUT or DELETE call 4094 for a resource, set the `if-match` parameter to the value of the 4095 etag from a previous GET or POST response for that resource. 4096 The resource will be updated or deleted only if the etag you 4097 provide matches the resource's current etag value. 4098 4099 :param str opc_request_id: (optional) 4100 The client request ID for tracing. 4101 4102 :param obj retry_strategy: (optional) 4103 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4104 4105 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 4106 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4107 4108 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4109 4110 :return: A :class:`~oci.response.Response` object with data of type None 4111 :rtype: :class:`~oci.response.Response` 4112 4113 :example: 4114 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_metastore.py.html>`__ to see an example of how to use delete_metastore API. 4115 """ 4116 resource_path = "/metastores/{metastoreId}" 4117 method = "DELETE" 4118 4119 # Don't accept unknown kwargs 4120 expected_kwargs = [ 4121 "retry_strategy", 4122 "if_match", 4123 "opc_request_id" 4124 ] 4125 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4126 if extra_kwargs: 4127 raise ValueError( 4128 "delete_metastore got unknown kwargs: {!r}".format(extra_kwargs)) 4129 4130 path_params = { 4131 "metastoreId": metastore_id 4132 } 4133 4134 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4135 4136 for (k, v) in six.iteritems(path_params): 4137 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4138 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4139 4140 header_params = { 4141 "accept": "application/json", 4142 "content-type": "application/json", 4143 "if-match": kwargs.get("if_match", missing), 4144 "opc-request-id": kwargs.get("opc_request_id", missing) 4145 } 4146 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4147 4148 retry_strategy = self.base_client.get_preferred_retry_strategy( 4149 operation_retry_strategy=kwargs.get('retry_strategy'), 4150 client_retry_strategy=self.retry_strategy 4151 ) 4152 4153 if retry_strategy: 4154 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4155 self.base_client.add_opc_client_retries_header(header_params) 4156 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4157 return retry_strategy.make_retrying_call( 4158 self.base_client.call_api, 4159 resource_path=resource_path, 4160 method=method, 4161 path_params=path_params, 4162 header_params=header_params) 4163 else: 4164 return self.base_client.call_api( 4165 resource_path=resource_path, 4166 method=method, 4167 path_params=path_params, 4168 header_params=header_params) 4169 4170 def delete_namespace(self, catalog_id, namespace_id, **kwargs): 4171 """ 4172 Deletes a specific Namespace identified by it's key. 4173 4174 4175 :param str catalog_id: (required) 4176 Unique catalog identifier. 4177 4178 :param str namespace_id: (required) 4179 Unique namespace identifier. 4180 4181 :param str if_match: (optional) 4182 For optimistic concurrency control. In the PUT or DELETE call 4183 for a resource, set the `if-match` parameter to the value of the 4184 etag from a previous GET or POST response for that resource. 4185 The resource will be updated or deleted only if the etag you 4186 provide matches the resource's current etag value. 4187 4188 :param str opc_request_id: (optional) 4189 The client request ID for tracing. 4190 4191 :param obj retry_strategy: (optional) 4192 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4193 4194 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 4195 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4196 4197 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4198 4199 :return: A :class:`~oci.response.Response` object with data of type None 4200 :rtype: :class:`~oci.response.Response` 4201 4202 :example: 4203 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_namespace.py.html>`__ to see an example of how to use delete_namespace API. 4204 """ 4205 resource_path = "/catalogs/{catalogId}/namespaces/{namespaceId}" 4206 method = "DELETE" 4207 4208 # Don't accept unknown kwargs 4209 expected_kwargs = [ 4210 "retry_strategy", 4211 "if_match", 4212 "opc_request_id" 4213 ] 4214 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4215 if extra_kwargs: 4216 raise ValueError( 4217 "delete_namespace got unknown kwargs: {!r}".format(extra_kwargs)) 4218 4219 path_params = { 4220 "catalogId": catalog_id, 4221 "namespaceId": namespace_id 4222 } 4223 4224 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4225 4226 for (k, v) in six.iteritems(path_params): 4227 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4228 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4229 4230 header_params = { 4231 "accept": "application/json", 4232 "content-type": "application/json", 4233 "if-match": kwargs.get("if_match", missing), 4234 "opc-request-id": kwargs.get("opc_request_id", missing) 4235 } 4236 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4237 4238 retry_strategy = self.base_client.get_preferred_retry_strategy( 4239 operation_retry_strategy=kwargs.get('retry_strategy'), 4240 client_retry_strategy=self.retry_strategy 4241 ) 4242 4243 if retry_strategy: 4244 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4245 self.base_client.add_opc_client_retries_header(header_params) 4246 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4247 return retry_strategy.make_retrying_call( 4248 self.base_client.call_api, 4249 resource_path=resource_path, 4250 method=method, 4251 path_params=path_params, 4252 header_params=header_params) 4253 else: 4254 return self.base_client.call_api( 4255 resource_path=resource_path, 4256 method=method, 4257 path_params=path_params, 4258 header_params=header_params) 4259 4260 def delete_pattern(self, catalog_id, pattern_key, **kwargs): 4261 """ 4262 Deletes a specific pattern identified by it's key. 4263 4264 4265 :param str catalog_id: (required) 4266 Unique catalog identifier. 4267 4268 :param str pattern_key: (required) 4269 Unique pattern key. 4270 4271 :param str if_match: (optional) 4272 For optimistic concurrency control. In the PUT or DELETE call 4273 for a resource, set the `if-match` parameter to the value of the 4274 etag from a previous GET or POST response for that resource. 4275 The resource will be updated or deleted only if the etag you 4276 provide matches the resource's current etag value. 4277 4278 :param str opc_request_id: (optional) 4279 The client request ID for tracing. 4280 4281 :param obj retry_strategy: (optional) 4282 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4283 4284 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 4285 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4286 4287 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4288 4289 :return: A :class:`~oci.response.Response` object with data of type None 4290 :rtype: :class:`~oci.response.Response` 4291 4292 :example: 4293 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_pattern.py.html>`__ to see an example of how to use delete_pattern API. 4294 """ 4295 resource_path = "/catalogs/{catalogId}/patterns/{patternKey}" 4296 method = "DELETE" 4297 4298 # Don't accept unknown kwargs 4299 expected_kwargs = [ 4300 "retry_strategy", 4301 "if_match", 4302 "opc_request_id" 4303 ] 4304 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4305 if extra_kwargs: 4306 raise ValueError( 4307 "delete_pattern got unknown kwargs: {!r}".format(extra_kwargs)) 4308 4309 path_params = { 4310 "catalogId": catalog_id, 4311 "patternKey": pattern_key 4312 } 4313 4314 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4315 4316 for (k, v) in six.iteritems(path_params): 4317 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4318 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4319 4320 header_params = { 4321 "accept": "application/json", 4322 "content-type": "application/json", 4323 "if-match": kwargs.get("if_match", missing), 4324 "opc-request-id": kwargs.get("opc_request_id", missing) 4325 } 4326 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4327 4328 retry_strategy = self.base_client.get_preferred_retry_strategy( 4329 operation_retry_strategy=kwargs.get('retry_strategy'), 4330 client_retry_strategy=self.retry_strategy 4331 ) 4332 4333 if retry_strategy: 4334 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4335 self.base_client.add_opc_client_retries_header(header_params) 4336 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4337 return retry_strategy.make_retrying_call( 4338 self.base_client.call_api, 4339 resource_path=resource_path, 4340 method=method, 4341 path_params=path_params, 4342 header_params=header_params) 4343 else: 4344 return self.base_client.call_api( 4345 resource_path=resource_path, 4346 method=method, 4347 path_params=path_params, 4348 header_params=header_params) 4349 4350 def delete_term(self, catalog_id, glossary_key, term_key, **kwargs): 4351 """ 4352 Deletes a specific glossary term. 4353 4354 4355 :param str catalog_id: (required) 4356 Unique catalog identifier. 4357 4358 :param str glossary_key: (required) 4359 Unique glossary key. 4360 4361 :param str term_key: (required) 4362 Unique glossary term key. 4363 4364 :param str if_match: (optional) 4365 For optimistic concurrency control. In the PUT or DELETE call 4366 for a resource, set the `if-match` parameter to the value of the 4367 etag from a previous GET or POST response for that resource. 4368 The resource will be updated or deleted only if the etag you 4369 provide matches the resource's current etag value. 4370 4371 :param str opc_request_id: (optional) 4372 The client request ID for tracing. 4373 4374 :param obj retry_strategy: (optional) 4375 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4376 4377 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 4378 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4379 4380 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4381 4382 :return: A :class:`~oci.response.Response` object with data of type None 4383 :rtype: :class:`~oci.response.Response` 4384 4385 :example: 4386 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_term.py.html>`__ to see an example of how to use delete_term API. 4387 """ 4388 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms/{termKey}" 4389 method = "DELETE" 4390 4391 # Don't accept unknown kwargs 4392 expected_kwargs = [ 4393 "retry_strategy", 4394 "if_match", 4395 "opc_request_id" 4396 ] 4397 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4398 if extra_kwargs: 4399 raise ValueError( 4400 "delete_term got unknown kwargs: {!r}".format(extra_kwargs)) 4401 4402 path_params = { 4403 "catalogId": catalog_id, 4404 "glossaryKey": glossary_key, 4405 "termKey": term_key 4406 } 4407 4408 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4409 4410 for (k, v) in six.iteritems(path_params): 4411 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4412 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4413 4414 header_params = { 4415 "accept": "application/json", 4416 "content-type": "application/json", 4417 "if-match": kwargs.get("if_match", missing), 4418 "opc-request-id": kwargs.get("opc_request_id", missing) 4419 } 4420 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4421 4422 retry_strategy = self.base_client.get_preferred_retry_strategy( 4423 operation_retry_strategy=kwargs.get('retry_strategy'), 4424 client_retry_strategy=self.retry_strategy 4425 ) 4426 4427 if retry_strategy: 4428 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4429 self.base_client.add_opc_client_retries_header(header_params) 4430 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4431 return retry_strategy.make_retrying_call( 4432 self.base_client.call_api, 4433 resource_path=resource_path, 4434 method=method, 4435 path_params=path_params, 4436 header_params=header_params) 4437 else: 4438 return self.base_client.call_api( 4439 resource_path=resource_path, 4440 method=method, 4441 path_params=path_params, 4442 header_params=header_params) 4443 4444 def delete_term_relationship(self, catalog_id, glossary_key, term_key, term_relationship_key, **kwargs): 4445 """ 4446 Deletes a specific glossary term relationship. 4447 4448 4449 :param str catalog_id: (required) 4450 Unique catalog identifier. 4451 4452 :param str glossary_key: (required) 4453 Unique glossary key. 4454 4455 :param str term_key: (required) 4456 Unique glossary term key. 4457 4458 :param str term_relationship_key: (required) 4459 Unique glossary term relationship key. 4460 4461 :param str if_match: (optional) 4462 For optimistic concurrency control. In the PUT or DELETE call 4463 for a resource, set the `if-match` parameter to the value of the 4464 etag from a previous GET or POST response for that resource. 4465 The resource will be updated or deleted only if the etag you 4466 provide matches the resource's current etag value. 4467 4468 :param str opc_request_id: (optional) 4469 The client request ID for tracing. 4470 4471 :param obj retry_strategy: (optional) 4472 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4473 4474 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 4475 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4476 4477 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4478 4479 :return: A :class:`~oci.response.Response` object with data of type None 4480 :rtype: :class:`~oci.response.Response` 4481 4482 :example: 4483 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/delete_term_relationship.py.html>`__ to see an example of how to use delete_term_relationship API. 4484 """ 4485 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms/{termKey}/termRelationships/{termRelationshipKey}" 4486 method = "DELETE" 4487 4488 # Don't accept unknown kwargs 4489 expected_kwargs = [ 4490 "retry_strategy", 4491 "if_match", 4492 "opc_request_id" 4493 ] 4494 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4495 if extra_kwargs: 4496 raise ValueError( 4497 "delete_term_relationship got unknown kwargs: {!r}".format(extra_kwargs)) 4498 4499 path_params = { 4500 "catalogId": catalog_id, 4501 "glossaryKey": glossary_key, 4502 "termKey": term_key, 4503 "termRelationshipKey": term_relationship_key 4504 } 4505 4506 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4507 4508 for (k, v) in six.iteritems(path_params): 4509 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4510 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4511 4512 header_params = { 4513 "accept": "application/json", 4514 "content-type": "application/json", 4515 "if-match": kwargs.get("if_match", missing), 4516 "opc-request-id": kwargs.get("opc_request_id", missing) 4517 } 4518 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4519 4520 retry_strategy = self.base_client.get_preferred_retry_strategy( 4521 operation_retry_strategy=kwargs.get('retry_strategy'), 4522 client_retry_strategy=self.retry_strategy 4523 ) 4524 4525 if retry_strategy: 4526 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4527 self.base_client.add_opc_client_retries_header(header_params) 4528 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4529 return retry_strategy.make_retrying_call( 4530 self.base_client.call_api, 4531 resource_path=resource_path, 4532 method=method, 4533 path_params=path_params, 4534 header_params=header_params) 4535 else: 4536 return self.base_client.call_api( 4537 resource_path=resource_path, 4538 method=method, 4539 path_params=path_params, 4540 header_params=header_params) 4541 4542 def detach_catalog_private_endpoint(self, detach_catalog_private_endpoint_details, catalog_id, **kwargs): 4543 """ 4544 Detaches a private reverse connection endpoint resource to a data catalog resource. When provided, 'If-Match' is checked against 'ETag' values of the resource. 4545 4546 4547 :param oci.data_catalog.models.DetachCatalogPrivateEndpointDetails detach_catalog_private_endpoint_details: (required) 4548 Details for private reverse connection endpoint to be used for attachment 4549 4550 :param str catalog_id: (required) 4551 Unique catalog identifier. 4552 4553 :param str if_match: (optional) 4554 For optimistic concurrency control. In the PUT or DELETE call 4555 for a resource, set the `if-match` parameter to the value of the 4556 etag from a previous GET or POST response for that resource. 4557 The resource will be updated or deleted only if the etag you 4558 provide matches the resource's current etag value. 4559 4560 :param str opc_request_id: (optional) 4561 The client request ID for tracing. 4562 4563 :param obj retry_strategy: (optional) 4564 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4565 4566 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 4567 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4568 4569 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4570 4571 :return: A :class:`~oci.response.Response` object with data of type None 4572 :rtype: :class:`~oci.response.Response` 4573 4574 :example: 4575 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/detach_catalog_private_endpoint.py.html>`__ to see an example of how to use detach_catalog_private_endpoint API. 4576 """ 4577 resource_path = "/catalogs/{catalogId}/actions/detachCatalogPrivateEndpoint" 4578 method = "POST" 4579 4580 # Don't accept unknown kwargs 4581 expected_kwargs = [ 4582 "retry_strategy", 4583 "if_match", 4584 "opc_request_id" 4585 ] 4586 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4587 if extra_kwargs: 4588 raise ValueError( 4589 "detach_catalog_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) 4590 4591 path_params = { 4592 "catalogId": catalog_id 4593 } 4594 4595 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4596 4597 for (k, v) in six.iteritems(path_params): 4598 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4599 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4600 4601 header_params = { 4602 "accept": "application/json", 4603 "content-type": "application/json", 4604 "if-match": kwargs.get("if_match", missing), 4605 "opc-request-id": kwargs.get("opc_request_id", missing) 4606 } 4607 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4608 4609 retry_strategy = self.base_client.get_preferred_retry_strategy( 4610 operation_retry_strategy=kwargs.get('retry_strategy'), 4611 client_retry_strategy=self.retry_strategy 4612 ) 4613 4614 if retry_strategy: 4615 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4616 self.base_client.add_opc_client_retries_header(header_params) 4617 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4618 return retry_strategy.make_retrying_call( 4619 self.base_client.call_api, 4620 resource_path=resource_path, 4621 method=method, 4622 path_params=path_params, 4623 header_params=header_params, 4624 body=detach_catalog_private_endpoint_details) 4625 else: 4626 return self.base_client.call_api( 4627 resource_path=resource_path, 4628 method=method, 4629 path_params=path_params, 4630 header_params=header_params, 4631 body=detach_catalog_private_endpoint_details) 4632 4633 def disassociate_custom_property(self, catalog_id, type_key, disassociate_custom_property_details, **kwargs): 4634 """ 4635 Remove the custom property for the given type 4636 4637 4638 :param str catalog_id: (required) 4639 Unique catalog identifier. 4640 4641 :param str type_key: (required) 4642 Unique type key. 4643 4644 :param oci.data_catalog.models.TypeCustomPropertyDetails disassociate_custom_property_details: (required) 4645 The information used to remove the custom properties. 4646 4647 :param str opc_request_id: (optional) 4648 The client request ID for tracing. 4649 4650 :param str if_match: (optional) 4651 For optimistic concurrency control. In the PUT or DELETE call 4652 for a resource, set the `if-match` parameter to the value of the 4653 etag from a previous GET or POST response for that resource. 4654 The resource will be updated or deleted only if the etag you 4655 provide matches the resource's current etag value. 4656 4657 :param str opc_retry_token: (optional) 4658 A token that uniquely identifies a request so it can be retried in case of a timeout or 4659 server error without risk of executing that same action again. Retry tokens expire after 24 4660 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 4661 has been deleted and purged from the system, then a retry of the original creation request 4662 might be rejected. 4663 4664 :param obj retry_strategy: (optional) 4665 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4666 4667 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 4668 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4669 4670 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4671 4672 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Type` 4673 :rtype: :class:`~oci.response.Response` 4674 4675 :example: 4676 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/disassociate_custom_property.py.html>`__ to see an example of how to use disassociate_custom_property API. 4677 """ 4678 resource_path = "/catalogs/{catalogId}/types/{typeKey}/actions/disassociateCustomProperties" 4679 method = "POST" 4680 4681 # Don't accept unknown kwargs 4682 expected_kwargs = [ 4683 "retry_strategy", 4684 "opc_request_id", 4685 "if_match", 4686 "opc_retry_token" 4687 ] 4688 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4689 if extra_kwargs: 4690 raise ValueError( 4691 "disassociate_custom_property got unknown kwargs: {!r}".format(extra_kwargs)) 4692 4693 path_params = { 4694 "catalogId": catalog_id, 4695 "typeKey": type_key 4696 } 4697 4698 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4699 4700 for (k, v) in six.iteritems(path_params): 4701 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4702 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4703 4704 header_params = { 4705 "accept": "application/json", 4706 "content-type": "application/json", 4707 "opc-request-id": kwargs.get("opc_request_id", missing), 4708 "if-match": kwargs.get("if_match", missing), 4709 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4710 } 4711 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4712 4713 retry_strategy = self.base_client.get_preferred_retry_strategy( 4714 operation_retry_strategy=kwargs.get('retry_strategy'), 4715 client_retry_strategy=self.retry_strategy 4716 ) 4717 4718 if retry_strategy: 4719 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4720 self.base_client.add_opc_retry_token_if_needed(header_params) 4721 self.base_client.add_opc_client_retries_header(header_params) 4722 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4723 return retry_strategy.make_retrying_call( 4724 self.base_client.call_api, 4725 resource_path=resource_path, 4726 method=method, 4727 path_params=path_params, 4728 header_params=header_params, 4729 body=disassociate_custom_property_details, 4730 response_type="Type") 4731 else: 4732 return self.base_client.call_api( 4733 resource_path=resource_path, 4734 method=method, 4735 path_params=path_params, 4736 header_params=header_params, 4737 body=disassociate_custom_property_details, 4738 response_type="Type") 4739 4740 def expand_tree_for_glossary(self, catalog_id, glossary_key, **kwargs): 4741 """ 4742 Returns the fully expanded tree hierarchy of parent and child terms in this glossary. 4743 4744 4745 :param str catalog_id: (required) 4746 Unique catalog identifier. 4747 4748 :param str glossary_key: (required) 4749 Unique glossary key. 4750 4751 :param str opc_request_id: (optional) 4752 The client request ID for tracing. 4753 4754 :param str opc_retry_token: (optional) 4755 A token that uniquely identifies a request so it can be retried in case of a timeout or 4756 server error without risk of executing that same action again. Retry tokens expire after 24 4757 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 4758 has been deleted and purged from the system, then a retry of the original creation request 4759 might be rejected. 4760 4761 :param obj retry_strategy: (optional) 4762 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4763 4764 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 4765 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4766 4767 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4768 4769 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_catalog.models.GlossaryTreeElement` 4770 :rtype: :class:`~oci.response.Response` 4771 4772 :example: 4773 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/expand_tree_for_glossary.py.html>`__ to see an example of how to use expand_tree_for_glossary API. 4774 """ 4775 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/actions/expandTree" 4776 method = "POST" 4777 4778 # Don't accept unknown kwargs 4779 expected_kwargs = [ 4780 "retry_strategy", 4781 "opc_request_id", 4782 "opc_retry_token" 4783 ] 4784 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4785 if extra_kwargs: 4786 raise ValueError( 4787 "expand_tree_for_glossary got unknown kwargs: {!r}".format(extra_kwargs)) 4788 4789 path_params = { 4790 "catalogId": catalog_id, 4791 "glossaryKey": glossary_key 4792 } 4793 4794 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4795 4796 for (k, v) in six.iteritems(path_params): 4797 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4798 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4799 4800 header_params = { 4801 "accept": "application/json", 4802 "content-type": "application/json", 4803 "opc-request-id": kwargs.get("opc_request_id", missing), 4804 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4805 } 4806 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4807 4808 retry_strategy = self.base_client.get_preferred_retry_strategy( 4809 operation_retry_strategy=kwargs.get('retry_strategy'), 4810 client_retry_strategy=self.retry_strategy 4811 ) 4812 if retry_strategy is None: 4813 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 4814 4815 if retry_strategy: 4816 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4817 self.base_client.add_opc_retry_token_if_needed(header_params) 4818 self.base_client.add_opc_client_retries_header(header_params) 4819 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4820 return retry_strategy.make_retrying_call( 4821 self.base_client.call_api, 4822 resource_path=resource_path, 4823 method=method, 4824 path_params=path_params, 4825 header_params=header_params, 4826 response_type="list[GlossaryTreeElement]") 4827 else: 4828 return self.base_client.call_api( 4829 resource_path=resource_path, 4830 method=method, 4831 path_params=path_params, 4832 header_params=header_params, 4833 response_type="list[GlossaryTreeElement]") 4834 4835 def export_glossary(self, catalog_id, glossary_key, **kwargs): 4836 """ 4837 Export the glossary and the terms and return the exported glossary as csv or json. 4838 4839 4840 :param str catalog_id: (required) 4841 Unique catalog identifier. 4842 4843 :param str glossary_key: (required) 4844 Unique glossary key. 4845 4846 :param bool is_relationship_exported: (optional) 4847 Specify if the relationship metadata is exported for the glossary. 4848 4849 :param str opc_request_id: (optional) 4850 The client request ID for tracing. 4851 4852 :param str opc_retry_token: (optional) 4853 A token that uniquely identifies a request so it can be retried in case of a timeout or 4854 server error without risk of executing that same action again. Retry tokens expire after 24 4855 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 4856 has been deleted and purged from the system, then a retry of the original creation request 4857 might be rejected. 4858 4859 :param obj retry_strategy: (optional) 4860 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4861 4862 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 4863 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4864 4865 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4866 4867 :return: A :class:`~oci.response.Response` object with data of type str 4868 :rtype: :class:`~oci.response.Response` 4869 4870 :example: 4871 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/export_glossary.py.html>`__ to see an example of how to use export_glossary API. 4872 """ 4873 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/actions/export" 4874 method = "POST" 4875 4876 # Don't accept unknown kwargs 4877 expected_kwargs = [ 4878 "retry_strategy", 4879 "is_relationship_exported", 4880 "opc_request_id", 4881 "opc_retry_token" 4882 ] 4883 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4884 if extra_kwargs: 4885 raise ValueError( 4886 "export_glossary got unknown kwargs: {!r}".format(extra_kwargs)) 4887 4888 path_params = { 4889 "catalogId": catalog_id, 4890 "glossaryKey": glossary_key 4891 } 4892 4893 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 4894 4895 for (k, v) in six.iteritems(path_params): 4896 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 4897 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 4898 4899 query_params = { 4900 "isRelationshipExported": kwargs.get("is_relationship_exported", missing) 4901 } 4902 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 4903 4904 header_params = { 4905 "accept": "application/json, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 4906 "content-type": "application/json", 4907 "opc-request-id": kwargs.get("opc_request_id", missing), 4908 "opc-retry-token": kwargs.get("opc_retry_token", missing) 4909 } 4910 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 4911 4912 retry_strategy = self.base_client.get_preferred_retry_strategy( 4913 operation_retry_strategy=kwargs.get('retry_strategy'), 4914 client_retry_strategy=self.retry_strategy 4915 ) 4916 4917 if retry_strategy: 4918 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 4919 self.base_client.add_opc_retry_token_if_needed(header_params) 4920 self.base_client.add_opc_client_retries_header(header_params) 4921 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 4922 return retry_strategy.make_retrying_call( 4923 self.base_client.call_api, 4924 resource_path=resource_path, 4925 method=method, 4926 path_params=path_params, 4927 query_params=query_params, 4928 header_params=header_params, 4929 response_type="str") 4930 else: 4931 return self.base_client.call_api( 4932 resource_path=resource_path, 4933 method=method, 4934 path_params=path_params, 4935 query_params=query_params, 4936 header_params=header_params, 4937 response_type="str") 4938 4939 def get_attribute(self, catalog_id, data_asset_key, entity_key, attribute_key, **kwargs): 4940 """ 4941 Gets a specific entity attribute by key. 4942 4943 4944 :param str catalog_id: (required) 4945 Unique catalog identifier. 4946 4947 :param str data_asset_key: (required) 4948 Unique data asset key. 4949 4950 :param str entity_key: (required) 4951 Unique entity key. 4952 4953 :param str attribute_key: (required) 4954 Unique attribute key. 4955 4956 :param bool is_include_object_relationships: (optional) 4957 Indicates whether the list of objects and their relationships to this object will be provided in the response. 4958 4959 :param list[str] fields: (optional) 4960 Specifies the fields to return in an entity attribute response. 4961 4962 Allowed values are: "key", "displayName", "description", "entityKey", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "externalDataType", "externalKey", "isIncrementalData", "isNullable", "length", "position", "precision", "scale", "timeExternal", "uri", "properties", "path", "minCollectionCount", "maxCollectionCount", "datatypeEntityKey", "externalDatatypeEntityKey", "parentAttributeKey", "externalParentAttributeKey", "typeKey" 4963 4964 :param str opc_request_id: (optional) 4965 The client request ID for tracing. 4966 4967 :param obj retry_strategy: (optional) 4968 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 4969 4970 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 4971 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 4972 4973 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 4974 4975 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Attribute` 4976 :rtype: :class:`~oci.response.Response` 4977 4978 :example: 4979 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_attribute.py.html>`__ to see an example of how to use get_attribute API. 4980 """ 4981 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/attributes/{attributeKey}" 4982 method = "GET" 4983 4984 # Don't accept unknown kwargs 4985 expected_kwargs = [ 4986 "retry_strategy", 4987 "is_include_object_relationships", 4988 "fields", 4989 "opc_request_id" 4990 ] 4991 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 4992 if extra_kwargs: 4993 raise ValueError( 4994 "get_attribute got unknown kwargs: {!r}".format(extra_kwargs)) 4995 4996 path_params = { 4997 "catalogId": catalog_id, 4998 "dataAssetKey": data_asset_key, 4999 "entityKey": entity_key, 5000 "attributeKey": attribute_key 5001 } 5002 5003 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5004 5005 for (k, v) in six.iteritems(path_params): 5006 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5007 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5008 5009 if 'fields' in kwargs: 5010 fields_allowed_values = ["key", "displayName", "description", "entityKey", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "externalDataType", "externalKey", "isIncrementalData", "isNullable", "length", "position", "precision", "scale", "timeExternal", "uri", "properties", "path", "minCollectionCount", "maxCollectionCount", "datatypeEntityKey", "externalDatatypeEntityKey", "parentAttributeKey", "externalParentAttributeKey", "typeKey"] 5011 for fields_item in kwargs['fields']: 5012 if fields_item not in fields_allowed_values: 5013 raise ValueError( 5014 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 5015 ) 5016 5017 query_params = { 5018 "isIncludeObjectRelationships": kwargs.get("is_include_object_relationships", missing), 5019 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 5020 } 5021 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 5022 5023 header_params = { 5024 "accept": "application/json", 5025 "content-type": "application/json", 5026 "opc-request-id": kwargs.get("opc_request_id", missing) 5027 } 5028 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5029 5030 retry_strategy = self.base_client.get_preferred_retry_strategy( 5031 operation_retry_strategy=kwargs.get('retry_strategy'), 5032 client_retry_strategy=self.retry_strategy 5033 ) 5034 if retry_strategy is None: 5035 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5036 5037 if retry_strategy: 5038 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5039 self.base_client.add_opc_client_retries_header(header_params) 5040 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5041 return retry_strategy.make_retrying_call( 5042 self.base_client.call_api, 5043 resource_path=resource_path, 5044 method=method, 5045 path_params=path_params, 5046 query_params=query_params, 5047 header_params=header_params, 5048 response_type="Attribute") 5049 else: 5050 return self.base_client.call_api( 5051 resource_path=resource_path, 5052 method=method, 5053 path_params=path_params, 5054 query_params=query_params, 5055 header_params=header_params, 5056 response_type="Attribute") 5057 5058 def get_attribute_tag(self, catalog_id, data_asset_key, entity_key, attribute_key, tag_key, **kwargs): 5059 """ 5060 Gets a specific entity attribute tag by key. 5061 5062 5063 :param str catalog_id: (required) 5064 Unique catalog identifier. 5065 5066 :param str data_asset_key: (required) 5067 Unique data asset key. 5068 5069 :param str entity_key: (required) 5070 Unique entity key. 5071 5072 :param str attribute_key: (required) 5073 Unique attribute key. 5074 5075 :param str tag_key: (required) 5076 Unique tag key. 5077 5078 :param list[str] fields: (optional) 5079 Specifies the fields to return in an entity attribute tag response. 5080 5081 Allowed values are: "key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "createdById", "uri", "attributeKey" 5082 5083 :param str opc_request_id: (optional) 5084 The client request ID for tracing. 5085 5086 :param obj retry_strategy: (optional) 5087 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5088 5089 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 5090 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5091 5092 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5093 5094 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.AttributeTag` 5095 :rtype: :class:`~oci.response.Response` 5096 5097 :example: 5098 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_attribute_tag.py.html>`__ to see an example of how to use get_attribute_tag API. 5099 """ 5100 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/attributes/{attributeKey}/tags/{tagKey}" 5101 method = "GET" 5102 5103 # Don't accept unknown kwargs 5104 expected_kwargs = [ 5105 "retry_strategy", 5106 "fields", 5107 "opc_request_id" 5108 ] 5109 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5110 if extra_kwargs: 5111 raise ValueError( 5112 "get_attribute_tag got unknown kwargs: {!r}".format(extra_kwargs)) 5113 5114 path_params = { 5115 "catalogId": catalog_id, 5116 "dataAssetKey": data_asset_key, 5117 "entityKey": entity_key, 5118 "attributeKey": attribute_key, 5119 "tagKey": tag_key 5120 } 5121 5122 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5123 5124 for (k, v) in six.iteritems(path_params): 5125 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5126 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5127 5128 if 'fields' in kwargs: 5129 fields_allowed_values = ["key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "createdById", "uri", "attributeKey"] 5130 for fields_item in kwargs['fields']: 5131 if fields_item not in fields_allowed_values: 5132 raise ValueError( 5133 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 5134 ) 5135 5136 query_params = { 5137 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 5138 } 5139 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 5140 5141 header_params = { 5142 "accept": "application/json", 5143 "content-type": "application/json", 5144 "opc-request-id": kwargs.get("opc_request_id", missing) 5145 } 5146 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5147 5148 retry_strategy = self.base_client.get_preferred_retry_strategy( 5149 operation_retry_strategy=kwargs.get('retry_strategy'), 5150 client_retry_strategy=self.retry_strategy 5151 ) 5152 if retry_strategy is None: 5153 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5154 5155 if retry_strategy: 5156 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5157 self.base_client.add_opc_client_retries_header(header_params) 5158 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5159 return retry_strategy.make_retrying_call( 5160 self.base_client.call_api, 5161 resource_path=resource_path, 5162 method=method, 5163 path_params=path_params, 5164 query_params=query_params, 5165 header_params=header_params, 5166 response_type="AttributeTag") 5167 else: 5168 return self.base_client.call_api( 5169 resource_path=resource_path, 5170 method=method, 5171 path_params=path_params, 5172 query_params=query_params, 5173 header_params=header_params, 5174 response_type="AttributeTag") 5175 5176 def get_catalog(self, catalog_id, **kwargs): 5177 """ 5178 Gets a data catalog by identifier. 5179 5180 5181 :param str catalog_id: (required) 5182 Unique catalog identifier. 5183 5184 :param str opc_request_id: (optional) 5185 The client request ID for tracing. 5186 5187 :param obj retry_strategy: (optional) 5188 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5189 5190 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 5191 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5192 5193 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5194 5195 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Catalog` 5196 :rtype: :class:`~oci.response.Response` 5197 5198 :example: 5199 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_catalog.py.html>`__ to see an example of how to use get_catalog API. 5200 """ 5201 resource_path = "/catalogs/{catalogId}" 5202 method = "GET" 5203 5204 # Don't accept unknown kwargs 5205 expected_kwargs = [ 5206 "retry_strategy", 5207 "opc_request_id" 5208 ] 5209 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5210 if extra_kwargs: 5211 raise ValueError( 5212 "get_catalog got unknown kwargs: {!r}".format(extra_kwargs)) 5213 5214 path_params = { 5215 "catalogId": catalog_id 5216 } 5217 5218 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5219 5220 for (k, v) in six.iteritems(path_params): 5221 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5222 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5223 5224 header_params = { 5225 "accept": "application/json", 5226 "content-type": "application/json", 5227 "opc-request-id": kwargs.get("opc_request_id", missing) 5228 } 5229 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5230 5231 retry_strategy = self.base_client.get_preferred_retry_strategy( 5232 operation_retry_strategy=kwargs.get('retry_strategy'), 5233 client_retry_strategy=self.retry_strategy 5234 ) 5235 if retry_strategy is None: 5236 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5237 5238 if retry_strategy: 5239 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5240 self.base_client.add_opc_client_retries_header(header_params) 5241 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5242 return retry_strategy.make_retrying_call( 5243 self.base_client.call_api, 5244 resource_path=resource_path, 5245 method=method, 5246 path_params=path_params, 5247 header_params=header_params, 5248 response_type="Catalog") 5249 else: 5250 return self.base_client.call_api( 5251 resource_path=resource_path, 5252 method=method, 5253 path_params=path_params, 5254 header_params=header_params, 5255 response_type="Catalog") 5256 5257 def get_catalog_private_endpoint(self, catalog_private_endpoint_id, **kwargs): 5258 """ 5259 Gets a specific private reverse connection by identifier. 5260 5261 5262 :param str catalog_private_endpoint_id: (required) 5263 Unique private reverse connection identifier. 5264 5265 :param str opc_request_id: (optional) 5266 The client request ID for tracing. 5267 5268 :param obj retry_strategy: (optional) 5269 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5270 5271 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 5272 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5273 5274 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5275 5276 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.CatalogPrivateEndpoint` 5277 :rtype: :class:`~oci.response.Response` 5278 5279 :example: 5280 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_catalog_private_endpoint.py.html>`__ to see an example of how to use get_catalog_private_endpoint API. 5281 """ 5282 resource_path = "/catalogPrivateEndpoints/{catalogPrivateEndpointId}" 5283 method = "GET" 5284 5285 # Don't accept unknown kwargs 5286 expected_kwargs = [ 5287 "retry_strategy", 5288 "opc_request_id" 5289 ] 5290 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5291 if extra_kwargs: 5292 raise ValueError( 5293 "get_catalog_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) 5294 5295 path_params = { 5296 "catalogPrivateEndpointId": catalog_private_endpoint_id 5297 } 5298 5299 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5300 5301 for (k, v) in six.iteritems(path_params): 5302 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5303 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5304 5305 header_params = { 5306 "accept": "application/json", 5307 "content-type": "application/json", 5308 "opc-request-id": kwargs.get("opc_request_id", missing) 5309 } 5310 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5311 5312 retry_strategy = self.base_client.get_preferred_retry_strategy( 5313 operation_retry_strategy=kwargs.get('retry_strategy'), 5314 client_retry_strategy=self.retry_strategy 5315 ) 5316 if retry_strategy is None: 5317 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5318 5319 if retry_strategy: 5320 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5321 self.base_client.add_opc_client_retries_header(header_params) 5322 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5323 return retry_strategy.make_retrying_call( 5324 self.base_client.call_api, 5325 resource_path=resource_path, 5326 method=method, 5327 path_params=path_params, 5328 header_params=header_params, 5329 response_type="CatalogPrivateEndpoint") 5330 else: 5331 return self.base_client.call_api( 5332 resource_path=resource_path, 5333 method=method, 5334 path_params=path_params, 5335 header_params=header_params, 5336 response_type="CatalogPrivateEndpoint") 5337 5338 def get_connection(self, catalog_id, data_asset_key, connection_key, **kwargs): 5339 """ 5340 Gets a specific data asset connection by key. 5341 5342 5343 :param str catalog_id: (required) 5344 Unique catalog identifier. 5345 5346 :param str data_asset_key: (required) 5347 Unique data asset key. 5348 5349 :param str connection_key: (required) 5350 Unique connection key. 5351 5352 :param list[str] fields: (optional) 5353 Specifies the fields to return in a connection response. 5354 5355 Allowed values are: "key", "displayName", "description", "dataAssetKey", "typeKey", "timeCreated", "timeUpdated", "createdById", "updatedById", "properties", "externalKey", "timeStatusUpdated", "lifecycleState", "isDefault", "uri" 5356 5357 :param str opc_request_id: (optional) 5358 The client request ID for tracing. 5359 5360 :param obj retry_strategy: (optional) 5361 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5362 5363 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 5364 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5365 5366 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5367 5368 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Connection` 5369 :rtype: :class:`~oci.response.Response` 5370 5371 :example: 5372 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_connection.py.html>`__ to see an example of how to use get_connection API. 5373 """ 5374 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/connections/{connectionKey}" 5375 method = "GET" 5376 5377 # Don't accept unknown kwargs 5378 expected_kwargs = [ 5379 "retry_strategy", 5380 "fields", 5381 "opc_request_id" 5382 ] 5383 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5384 if extra_kwargs: 5385 raise ValueError( 5386 "get_connection got unknown kwargs: {!r}".format(extra_kwargs)) 5387 5388 path_params = { 5389 "catalogId": catalog_id, 5390 "dataAssetKey": data_asset_key, 5391 "connectionKey": connection_key 5392 } 5393 5394 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5395 5396 for (k, v) in six.iteritems(path_params): 5397 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5398 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5399 5400 if 'fields' in kwargs: 5401 fields_allowed_values = ["key", "displayName", "description", "dataAssetKey", "typeKey", "timeCreated", "timeUpdated", "createdById", "updatedById", "properties", "externalKey", "timeStatusUpdated", "lifecycleState", "isDefault", "uri"] 5402 for fields_item in kwargs['fields']: 5403 if fields_item not in fields_allowed_values: 5404 raise ValueError( 5405 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 5406 ) 5407 5408 query_params = { 5409 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 5410 } 5411 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 5412 5413 header_params = { 5414 "accept": "application/json", 5415 "content-type": "application/json", 5416 "opc-request-id": kwargs.get("opc_request_id", missing) 5417 } 5418 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5419 5420 retry_strategy = self.base_client.get_preferred_retry_strategy( 5421 operation_retry_strategy=kwargs.get('retry_strategy'), 5422 client_retry_strategy=self.retry_strategy 5423 ) 5424 if retry_strategy is None: 5425 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5426 5427 if retry_strategy: 5428 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5429 self.base_client.add_opc_client_retries_header(header_params) 5430 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5431 return retry_strategy.make_retrying_call( 5432 self.base_client.call_api, 5433 resource_path=resource_path, 5434 method=method, 5435 path_params=path_params, 5436 query_params=query_params, 5437 header_params=header_params, 5438 response_type="Connection") 5439 else: 5440 return self.base_client.call_api( 5441 resource_path=resource_path, 5442 method=method, 5443 path_params=path_params, 5444 query_params=query_params, 5445 header_params=header_params, 5446 response_type="Connection") 5447 5448 def get_custom_property(self, catalog_id, namespace_id, custom_property_key, **kwargs): 5449 """ 5450 Gets a specific custom property for the given key within a data catalog. 5451 5452 5453 :param str catalog_id: (required) 5454 Unique catalog identifier. 5455 5456 :param str namespace_id: (required) 5457 Unique namespace identifier. 5458 5459 :param str custom_property_key: (required) 5460 Unique Custom Property key 5461 5462 :param list[str] fields: (optional) 5463 Specifies the fields to return in a custom property response. 5464 5465 Allowed values are: "key", "displayName", "description", "dataType", "namespaceName", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "properties" 5466 5467 :param str opc_request_id: (optional) 5468 The client request ID for tracing. 5469 5470 :param obj retry_strategy: (optional) 5471 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5472 5473 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 5474 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5475 5476 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5477 5478 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.CustomProperty` 5479 :rtype: :class:`~oci.response.Response` 5480 5481 :example: 5482 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_custom_property.py.html>`__ to see an example of how to use get_custom_property API. 5483 """ 5484 resource_path = "/catalogs/{catalogId}/namespaces/{namespaceId}/customProperties/{customPropertyKey}" 5485 method = "GET" 5486 5487 # Don't accept unknown kwargs 5488 expected_kwargs = [ 5489 "retry_strategy", 5490 "fields", 5491 "opc_request_id" 5492 ] 5493 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5494 if extra_kwargs: 5495 raise ValueError( 5496 "get_custom_property got unknown kwargs: {!r}".format(extra_kwargs)) 5497 5498 path_params = { 5499 "catalogId": catalog_id, 5500 "namespaceId": namespace_id, 5501 "customPropertyKey": custom_property_key 5502 } 5503 5504 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5505 5506 for (k, v) in six.iteritems(path_params): 5507 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5508 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5509 5510 if 'fields' in kwargs: 5511 fields_allowed_values = ["key", "displayName", "description", "dataType", "namespaceName", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "properties"] 5512 for fields_item in kwargs['fields']: 5513 if fields_item not in fields_allowed_values: 5514 raise ValueError( 5515 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 5516 ) 5517 5518 query_params = { 5519 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 5520 } 5521 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 5522 5523 header_params = { 5524 "accept": "application/json", 5525 "content-type": "application/json", 5526 "opc-request-id": kwargs.get("opc_request_id", missing) 5527 } 5528 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5529 5530 retry_strategy = self.base_client.get_preferred_retry_strategy( 5531 operation_retry_strategy=kwargs.get('retry_strategy'), 5532 client_retry_strategy=self.retry_strategy 5533 ) 5534 if retry_strategy is None: 5535 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5536 5537 if retry_strategy: 5538 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5539 self.base_client.add_opc_client_retries_header(header_params) 5540 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5541 return retry_strategy.make_retrying_call( 5542 self.base_client.call_api, 5543 resource_path=resource_path, 5544 method=method, 5545 path_params=path_params, 5546 query_params=query_params, 5547 header_params=header_params, 5548 response_type="CustomProperty") 5549 else: 5550 return self.base_client.call_api( 5551 resource_path=resource_path, 5552 method=method, 5553 path_params=path_params, 5554 query_params=query_params, 5555 header_params=header_params, 5556 response_type="CustomProperty") 5557 5558 def get_data_asset(self, catalog_id, data_asset_key, **kwargs): 5559 """ 5560 Gets a specific data asset for the given key within a data catalog. 5561 5562 5563 :param str catalog_id: (required) 5564 Unique catalog identifier. 5565 5566 :param str data_asset_key: (required) 5567 Unique data asset key. 5568 5569 :param list[str] fields: (optional) 5570 Specifies the fields to return in a data asset response. 5571 5572 Allowed values are: "key", "displayName", "description", "catalogId", "externalKey", "typeKey", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "uri", "properties" 5573 5574 :param str opc_request_id: (optional) 5575 The client request ID for tracing. 5576 5577 :param obj retry_strategy: (optional) 5578 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5579 5580 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 5581 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5582 5583 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5584 5585 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.DataAsset` 5586 :rtype: :class:`~oci.response.Response` 5587 5588 :example: 5589 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_data_asset.py.html>`__ to see an example of how to use get_data_asset API. 5590 """ 5591 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}" 5592 method = "GET" 5593 5594 # Don't accept unknown kwargs 5595 expected_kwargs = [ 5596 "retry_strategy", 5597 "fields", 5598 "opc_request_id" 5599 ] 5600 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5601 if extra_kwargs: 5602 raise ValueError( 5603 "get_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) 5604 5605 path_params = { 5606 "catalogId": catalog_id, 5607 "dataAssetKey": data_asset_key 5608 } 5609 5610 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5611 5612 for (k, v) in six.iteritems(path_params): 5613 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5614 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5615 5616 if 'fields' in kwargs: 5617 fields_allowed_values = ["key", "displayName", "description", "catalogId", "externalKey", "typeKey", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "uri", "properties"] 5618 for fields_item in kwargs['fields']: 5619 if fields_item not in fields_allowed_values: 5620 raise ValueError( 5621 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 5622 ) 5623 5624 query_params = { 5625 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 5626 } 5627 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 5628 5629 header_params = { 5630 "accept": "application/json", 5631 "content-type": "application/json", 5632 "opc-request-id": kwargs.get("opc_request_id", missing) 5633 } 5634 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5635 5636 retry_strategy = self.base_client.get_preferred_retry_strategy( 5637 operation_retry_strategy=kwargs.get('retry_strategy'), 5638 client_retry_strategy=self.retry_strategy 5639 ) 5640 if retry_strategy is None: 5641 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5642 5643 if retry_strategy: 5644 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5645 self.base_client.add_opc_client_retries_header(header_params) 5646 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5647 return retry_strategy.make_retrying_call( 5648 self.base_client.call_api, 5649 resource_path=resource_path, 5650 method=method, 5651 path_params=path_params, 5652 query_params=query_params, 5653 header_params=header_params, 5654 response_type="DataAsset") 5655 else: 5656 return self.base_client.call_api( 5657 resource_path=resource_path, 5658 method=method, 5659 path_params=path_params, 5660 query_params=query_params, 5661 header_params=header_params, 5662 response_type="DataAsset") 5663 5664 def get_data_asset_tag(self, catalog_id, data_asset_key, tag_key, **kwargs): 5665 """ 5666 Gets a specific data asset tag by key. 5667 5668 5669 :param str catalog_id: (required) 5670 Unique catalog identifier. 5671 5672 :param str data_asset_key: (required) 5673 Unique data asset key. 5674 5675 :param str tag_key: (required) 5676 Unique tag key. 5677 5678 :param list[str] fields: (optional) 5679 Specifies the fields to return in a data asset tag response. 5680 5681 Allowed values are: "key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "createdById", "uri", "dataAssetKey" 5682 5683 :param str opc_request_id: (optional) 5684 The client request ID for tracing. 5685 5686 :param obj retry_strategy: (optional) 5687 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5688 5689 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 5690 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5691 5692 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5693 5694 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.DataAssetTag` 5695 :rtype: :class:`~oci.response.Response` 5696 5697 :example: 5698 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_data_asset_tag.py.html>`__ to see an example of how to use get_data_asset_tag API. 5699 """ 5700 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/tags/{tagKey}" 5701 method = "GET" 5702 5703 # Don't accept unknown kwargs 5704 expected_kwargs = [ 5705 "retry_strategy", 5706 "fields", 5707 "opc_request_id" 5708 ] 5709 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5710 if extra_kwargs: 5711 raise ValueError( 5712 "get_data_asset_tag got unknown kwargs: {!r}".format(extra_kwargs)) 5713 5714 path_params = { 5715 "catalogId": catalog_id, 5716 "dataAssetKey": data_asset_key, 5717 "tagKey": tag_key 5718 } 5719 5720 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5721 5722 for (k, v) in six.iteritems(path_params): 5723 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5724 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5725 5726 if 'fields' in kwargs: 5727 fields_allowed_values = ["key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "createdById", "uri", "dataAssetKey"] 5728 for fields_item in kwargs['fields']: 5729 if fields_item not in fields_allowed_values: 5730 raise ValueError( 5731 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 5732 ) 5733 5734 query_params = { 5735 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 5736 } 5737 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 5738 5739 header_params = { 5740 "accept": "application/json", 5741 "content-type": "application/json", 5742 "opc-request-id": kwargs.get("opc_request_id", missing) 5743 } 5744 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5745 5746 retry_strategy = self.base_client.get_preferred_retry_strategy( 5747 operation_retry_strategy=kwargs.get('retry_strategy'), 5748 client_retry_strategy=self.retry_strategy 5749 ) 5750 if retry_strategy is None: 5751 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5752 5753 if retry_strategy: 5754 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5755 self.base_client.add_opc_client_retries_header(header_params) 5756 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5757 return retry_strategy.make_retrying_call( 5758 self.base_client.call_api, 5759 resource_path=resource_path, 5760 method=method, 5761 path_params=path_params, 5762 query_params=query_params, 5763 header_params=header_params, 5764 response_type="DataAssetTag") 5765 else: 5766 return self.base_client.call_api( 5767 resource_path=resource_path, 5768 method=method, 5769 path_params=path_params, 5770 query_params=query_params, 5771 header_params=header_params, 5772 response_type="DataAssetTag") 5773 5774 def get_entity(self, catalog_id, data_asset_key, entity_key, **kwargs): 5775 """ 5776 Gets a specific data entity by key for a data asset. 5777 5778 5779 :param str catalog_id: (required) 5780 Unique catalog identifier. 5781 5782 :param str data_asset_key: (required) 5783 Unique data asset key. 5784 5785 :param str entity_key: (required) 5786 Unique entity key. 5787 5788 :param bool is_include_object_relationships: (optional) 5789 Indicates whether the list of objects and their relationships to this object will be provided in the response. 5790 5791 :param list[str] fields: (optional) 5792 Specifies the fields to return in an entity response. 5793 5794 Allowed values are: "key", "displayName", "description", "dataAssetKey", "timeCreated", "timeUpdated", "createdById", "updatedById", "lifecycleState", "externalKey", "timeExternal", "timeStatusUpdated", "isLogical", "isPartition", "folderKey", "folderName", "typeKey", "path", "harvestStatus", "lastJobKey", "uri", "properties" 5795 5796 :param str opc_request_id: (optional) 5797 The client request ID for tracing. 5798 5799 :param obj retry_strategy: (optional) 5800 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5801 5802 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 5803 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5804 5805 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5806 5807 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Entity` 5808 :rtype: :class:`~oci.response.Response` 5809 5810 :example: 5811 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_entity.py.html>`__ to see an example of how to use get_entity API. 5812 """ 5813 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}" 5814 method = "GET" 5815 5816 # Don't accept unknown kwargs 5817 expected_kwargs = [ 5818 "retry_strategy", 5819 "is_include_object_relationships", 5820 "fields", 5821 "opc_request_id" 5822 ] 5823 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5824 if extra_kwargs: 5825 raise ValueError( 5826 "get_entity got unknown kwargs: {!r}".format(extra_kwargs)) 5827 5828 path_params = { 5829 "catalogId": catalog_id, 5830 "dataAssetKey": data_asset_key, 5831 "entityKey": entity_key 5832 } 5833 5834 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5835 5836 for (k, v) in six.iteritems(path_params): 5837 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5838 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5839 5840 if 'fields' in kwargs: 5841 fields_allowed_values = ["key", "displayName", "description", "dataAssetKey", "timeCreated", "timeUpdated", "createdById", "updatedById", "lifecycleState", "externalKey", "timeExternal", "timeStatusUpdated", "isLogical", "isPartition", "folderKey", "folderName", "typeKey", "path", "harvestStatus", "lastJobKey", "uri", "properties"] 5842 for fields_item in kwargs['fields']: 5843 if fields_item not in fields_allowed_values: 5844 raise ValueError( 5845 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 5846 ) 5847 5848 query_params = { 5849 "isIncludeObjectRelationships": kwargs.get("is_include_object_relationships", missing), 5850 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 5851 } 5852 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 5853 5854 header_params = { 5855 "accept": "application/json", 5856 "content-type": "application/json", 5857 "opc-request-id": kwargs.get("opc_request_id", missing) 5858 } 5859 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5860 5861 retry_strategy = self.base_client.get_preferred_retry_strategy( 5862 operation_retry_strategy=kwargs.get('retry_strategy'), 5863 client_retry_strategy=self.retry_strategy 5864 ) 5865 if retry_strategy is None: 5866 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5867 5868 if retry_strategy: 5869 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5870 self.base_client.add_opc_client_retries_header(header_params) 5871 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5872 return retry_strategy.make_retrying_call( 5873 self.base_client.call_api, 5874 resource_path=resource_path, 5875 method=method, 5876 path_params=path_params, 5877 query_params=query_params, 5878 header_params=header_params, 5879 response_type="Entity") 5880 else: 5881 return self.base_client.call_api( 5882 resource_path=resource_path, 5883 method=method, 5884 path_params=path_params, 5885 query_params=query_params, 5886 header_params=header_params, 5887 response_type="Entity") 5888 5889 def get_entity_tag(self, catalog_id, data_asset_key, entity_key, tag_key, **kwargs): 5890 """ 5891 Gets a specific entity tag by key. 5892 5893 5894 :param str catalog_id: (required) 5895 Unique catalog identifier. 5896 5897 :param str data_asset_key: (required) 5898 Unique data asset key. 5899 5900 :param str entity_key: (required) 5901 Unique entity key. 5902 5903 :param str tag_key: (required) 5904 Unique tag key. 5905 5906 :param list[str] fields: (optional) 5907 Specifies the fields to return in an entity tag response. 5908 5909 Allowed values are: "key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "createdById", "uri", "entityKey" 5910 5911 :param str opc_request_id: (optional) 5912 The client request ID for tracing. 5913 5914 :param obj retry_strategy: (optional) 5915 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 5916 5917 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 5918 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 5919 5920 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 5921 5922 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.EntityTag` 5923 :rtype: :class:`~oci.response.Response` 5924 5925 :example: 5926 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_entity_tag.py.html>`__ to see an example of how to use get_entity_tag API. 5927 """ 5928 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/tags/{tagKey}" 5929 method = "GET" 5930 5931 # Don't accept unknown kwargs 5932 expected_kwargs = [ 5933 "retry_strategy", 5934 "fields", 5935 "opc_request_id" 5936 ] 5937 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 5938 if extra_kwargs: 5939 raise ValueError( 5940 "get_entity_tag got unknown kwargs: {!r}".format(extra_kwargs)) 5941 5942 path_params = { 5943 "catalogId": catalog_id, 5944 "dataAssetKey": data_asset_key, 5945 "entityKey": entity_key, 5946 "tagKey": tag_key 5947 } 5948 5949 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 5950 5951 for (k, v) in six.iteritems(path_params): 5952 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 5953 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 5954 5955 if 'fields' in kwargs: 5956 fields_allowed_values = ["key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "createdById", "uri", "entityKey"] 5957 for fields_item in kwargs['fields']: 5958 if fields_item not in fields_allowed_values: 5959 raise ValueError( 5960 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 5961 ) 5962 5963 query_params = { 5964 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 5965 } 5966 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 5967 5968 header_params = { 5969 "accept": "application/json", 5970 "content-type": "application/json", 5971 "opc-request-id": kwargs.get("opc_request_id", missing) 5972 } 5973 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 5974 5975 retry_strategy = self.base_client.get_preferred_retry_strategy( 5976 operation_retry_strategy=kwargs.get('retry_strategy'), 5977 client_retry_strategy=self.retry_strategy 5978 ) 5979 if retry_strategy is None: 5980 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 5981 5982 if retry_strategy: 5983 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 5984 self.base_client.add_opc_client_retries_header(header_params) 5985 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 5986 return retry_strategy.make_retrying_call( 5987 self.base_client.call_api, 5988 resource_path=resource_path, 5989 method=method, 5990 path_params=path_params, 5991 query_params=query_params, 5992 header_params=header_params, 5993 response_type="EntityTag") 5994 else: 5995 return self.base_client.call_api( 5996 resource_path=resource_path, 5997 method=method, 5998 path_params=path_params, 5999 query_params=query_params, 6000 header_params=header_params, 6001 response_type="EntityTag") 6002 6003 def get_folder(self, catalog_id, data_asset_key, folder_key, **kwargs): 6004 """ 6005 Gets a specific data asset folder by key. 6006 6007 6008 :param str catalog_id: (required) 6009 Unique catalog identifier. 6010 6011 :param str data_asset_key: (required) 6012 Unique data asset key. 6013 6014 :param str folder_key: (required) 6015 Unique folder key. 6016 6017 :param bool is_include_object_relationships: (optional) 6018 Indicates whether the list of objects and their relationships to this object will be provided in the response. 6019 6020 :param list[str] fields: (optional) 6021 Specifies the fields to return in a folder response. 6022 6023 Allowed values are: "key", "displayName", "description", "parentFolderKey", "path", "dataAssetKey", "properties", "externalKey", "timeCreated", "timeUpdated", "createdById", "updatedById", "timeExternal", "lifecycleState", "harvestStatus", "lastJobKey", "uri" 6024 6025 :param str opc_request_id: (optional) 6026 The client request ID for tracing. 6027 6028 :param obj retry_strategy: (optional) 6029 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6030 6031 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6032 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6033 6034 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6035 6036 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Folder` 6037 :rtype: :class:`~oci.response.Response` 6038 6039 :example: 6040 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_folder.py.html>`__ to see an example of how to use get_folder API. 6041 """ 6042 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/folders/{folderKey}" 6043 method = "GET" 6044 6045 # Don't accept unknown kwargs 6046 expected_kwargs = [ 6047 "retry_strategy", 6048 "is_include_object_relationships", 6049 "fields", 6050 "opc_request_id" 6051 ] 6052 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6053 if extra_kwargs: 6054 raise ValueError( 6055 "get_folder got unknown kwargs: {!r}".format(extra_kwargs)) 6056 6057 path_params = { 6058 "catalogId": catalog_id, 6059 "dataAssetKey": data_asset_key, 6060 "folderKey": folder_key 6061 } 6062 6063 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6064 6065 for (k, v) in six.iteritems(path_params): 6066 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6067 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6068 6069 if 'fields' in kwargs: 6070 fields_allowed_values = ["key", "displayName", "description", "parentFolderKey", "path", "dataAssetKey", "properties", "externalKey", "timeCreated", "timeUpdated", "createdById", "updatedById", "timeExternal", "lifecycleState", "harvestStatus", "lastJobKey", "uri"] 6071 for fields_item in kwargs['fields']: 6072 if fields_item not in fields_allowed_values: 6073 raise ValueError( 6074 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 6075 ) 6076 6077 query_params = { 6078 "isIncludeObjectRelationships": kwargs.get("is_include_object_relationships", missing), 6079 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 6080 } 6081 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 6082 6083 header_params = { 6084 "accept": "application/json", 6085 "content-type": "application/json", 6086 "opc-request-id": kwargs.get("opc_request_id", missing) 6087 } 6088 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6089 6090 retry_strategy = self.base_client.get_preferred_retry_strategy( 6091 operation_retry_strategy=kwargs.get('retry_strategy'), 6092 client_retry_strategy=self.retry_strategy 6093 ) 6094 if retry_strategy is None: 6095 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 6096 6097 if retry_strategy: 6098 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6099 self.base_client.add_opc_client_retries_header(header_params) 6100 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6101 return retry_strategy.make_retrying_call( 6102 self.base_client.call_api, 6103 resource_path=resource_path, 6104 method=method, 6105 path_params=path_params, 6106 query_params=query_params, 6107 header_params=header_params, 6108 response_type="Folder") 6109 else: 6110 return self.base_client.call_api( 6111 resource_path=resource_path, 6112 method=method, 6113 path_params=path_params, 6114 query_params=query_params, 6115 header_params=header_params, 6116 response_type="Folder") 6117 6118 def get_folder_tag(self, catalog_id, data_asset_key, folder_key, tag_key, **kwargs): 6119 """ 6120 Gets a specific folder tag by key. 6121 6122 6123 :param str catalog_id: (required) 6124 Unique catalog identifier. 6125 6126 :param str data_asset_key: (required) 6127 Unique data asset key. 6128 6129 :param str folder_key: (required) 6130 Unique folder key. 6131 6132 :param str tag_key: (required) 6133 Unique tag key. 6134 6135 :param list[str] fields: (optional) 6136 Specifies the fields to return in a folder tag response. 6137 6138 Allowed values are: "key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "createdById", "uri", "folderKey" 6139 6140 :param str opc_request_id: (optional) 6141 The client request ID for tracing. 6142 6143 :param obj retry_strategy: (optional) 6144 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6145 6146 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6147 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6148 6149 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6150 6151 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.FolderTag` 6152 :rtype: :class:`~oci.response.Response` 6153 6154 :example: 6155 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_folder_tag.py.html>`__ to see an example of how to use get_folder_tag API. 6156 """ 6157 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/folders/{folderKey}/tags/{tagKey}" 6158 method = "GET" 6159 6160 # Don't accept unknown kwargs 6161 expected_kwargs = [ 6162 "retry_strategy", 6163 "fields", 6164 "opc_request_id" 6165 ] 6166 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6167 if extra_kwargs: 6168 raise ValueError( 6169 "get_folder_tag got unknown kwargs: {!r}".format(extra_kwargs)) 6170 6171 path_params = { 6172 "catalogId": catalog_id, 6173 "dataAssetKey": data_asset_key, 6174 "folderKey": folder_key, 6175 "tagKey": tag_key 6176 } 6177 6178 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6179 6180 for (k, v) in six.iteritems(path_params): 6181 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6182 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6183 6184 if 'fields' in kwargs: 6185 fields_allowed_values = ["key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "createdById", "uri", "folderKey"] 6186 for fields_item in kwargs['fields']: 6187 if fields_item not in fields_allowed_values: 6188 raise ValueError( 6189 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 6190 ) 6191 6192 query_params = { 6193 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 6194 } 6195 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 6196 6197 header_params = { 6198 "accept": "application/json", 6199 "content-type": "application/json", 6200 "opc-request-id": kwargs.get("opc_request_id", missing) 6201 } 6202 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6203 6204 retry_strategy = self.base_client.get_preferred_retry_strategy( 6205 operation_retry_strategy=kwargs.get('retry_strategy'), 6206 client_retry_strategy=self.retry_strategy 6207 ) 6208 if retry_strategy is None: 6209 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 6210 6211 if retry_strategy: 6212 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6213 self.base_client.add_opc_client_retries_header(header_params) 6214 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6215 return retry_strategy.make_retrying_call( 6216 self.base_client.call_api, 6217 resource_path=resource_path, 6218 method=method, 6219 path_params=path_params, 6220 query_params=query_params, 6221 header_params=header_params, 6222 response_type="FolderTag") 6223 else: 6224 return self.base_client.call_api( 6225 resource_path=resource_path, 6226 method=method, 6227 path_params=path_params, 6228 query_params=query_params, 6229 header_params=header_params, 6230 response_type="FolderTag") 6231 6232 def get_glossary(self, catalog_id, glossary_key, **kwargs): 6233 """ 6234 Gets a specific glossary by key within a data catalog. 6235 6236 6237 :param str catalog_id: (required) 6238 Unique catalog identifier. 6239 6240 :param str glossary_key: (required) 6241 Unique glossary key. 6242 6243 :param list[str] fields: (optional) 6244 Specifies the fields to return in a glossary response. 6245 6246 Allowed values are: "key", "displayName", "description", "catalogId", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "owner", "workflowStatus", "uri" 6247 6248 :param str opc_request_id: (optional) 6249 The client request ID for tracing. 6250 6251 :param obj retry_strategy: (optional) 6252 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6253 6254 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6255 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6256 6257 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6258 6259 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Glossary` 6260 :rtype: :class:`~oci.response.Response` 6261 6262 :example: 6263 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_glossary.py.html>`__ to see an example of how to use get_glossary API. 6264 """ 6265 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}" 6266 method = "GET" 6267 6268 # Don't accept unknown kwargs 6269 expected_kwargs = [ 6270 "retry_strategy", 6271 "fields", 6272 "opc_request_id" 6273 ] 6274 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6275 if extra_kwargs: 6276 raise ValueError( 6277 "get_glossary got unknown kwargs: {!r}".format(extra_kwargs)) 6278 6279 path_params = { 6280 "catalogId": catalog_id, 6281 "glossaryKey": glossary_key 6282 } 6283 6284 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6285 6286 for (k, v) in six.iteritems(path_params): 6287 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6288 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6289 6290 if 'fields' in kwargs: 6291 fields_allowed_values = ["key", "displayName", "description", "catalogId", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "owner", "workflowStatus", "uri"] 6292 for fields_item in kwargs['fields']: 6293 if fields_item not in fields_allowed_values: 6294 raise ValueError( 6295 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 6296 ) 6297 6298 query_params = { 6299 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 6300 } 6301 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 6302 6303 header_params = { 6304 "accept": "application/json", 6305 "content-type": "application/json", 6306 "opc-request-id": kwargs.get("opc_request_id", missing) 6307 } 6308 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6309 6310 retry_strategy = self.base_client.get_preferred_retry_strategy( 6311 operation_retry_strategy=kwargs.get('retry_strategy'), 6312 client_retry_strategy=self.retry_strategy 6313 ) 6314 if retry_strategy is None: 6315 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 6316 6317 if retry_strategy: 6318 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6319 self.base_client.add_opc_client_retries_header(header_params) 6320 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6321 return retry_strategy.make_retrying_call( 6322 self.base_client.call_api, 6323 resource_path=resource_path, 6324 method=method, 6325 path_params=path_params, 6326 query_params=query_params, 6327 header_params=header_params, 6328 response_type="Glossary") 6329 else: 6330 return self.base_client.call_api( 6331 resource_path=resource_path, 6332 method=method, 6333 path_params=path_params, 6334 query_params=query_params, 6335 header_params=header_params, 6336 response_type="Glossary") 6337 6338 def get_job(self, catalog_id, job_key, **kwargs): 6339 """ 6340 Gets a specific job by key within a data catalog. 6341 6342 6343 :param str catalog_id: (required) 6344 Unique catalog identifier. 6345 6346 :param str job_key: (required) 6347 Unique job key. 6348 6349 :param list[str] fields: (optional) 6350 Specifies the fields to return in a job response. 6351 6352 Allowed values are: "key", "displayName", "description", "catalogId", "lifecycleState", "timeCreated", "timeUpdated", "jobType", "scheduleCronExpression", "timeScheduleBegin", "timeScheduleEnd", "scheduleType", "connectionKey", "jobDefinitionKey", "internalVersion", "executionCount", "timeOfLatestExecution", "executions", "createdById", "updatedById", "uri", "jobDefinitionName", "errorCode", "errorMessage" 6353 6354 :param str opc_request_id: (optional) 6355 The client request ID for tracing. 6356 6357 :param obj retry_strategy: (optional) 6358 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6359 6360 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6361 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6362 6363 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6364 6365 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Job` 6366 :rtype: :class:`~oci.response.Response` 6367 6368 :example: 6369 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_job.py.html>`__ to see an example of how to use get_job API. 6370 """ 6371 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}" 6372 method = "GET" 6373 6374 # Don't accept unknown kwargs 6375 expected_kwargs = [ 6376 "retry_strategy", 6377 "fields", 6378 "opc_request_id" 6379 ] 6380 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6381 if extra_kwargs: 6382 raise ValueError( 6383 "get_job got unknown kwargs: {!r}".format(extra_kwargs)) 6384 6385 path_params = { 6386 "catalogId": catalog_id, 6387 "jobKey": job_key 6388 } 6389 6390 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6391 6392 for (k, v) in six.iteritems(path_params): 6393 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6394 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6395 6396 if 'fields' in kwargs: 6397 fields_allowed_values = ["key", "displayName", "description", "catalogId", "lifecycleState", "timeCreated", "timeUpdated", "jobType", "scheduleCronExpression", "timeScheduleBegin", "timeScheduleEnd", "scheduleType", "connectionKey", "jobDefinitionKey", "internalVersion", "executionCount", "timeOfLatestExecution", "executions", "createdById", "updatedById", "uri", "jobDefinitionName", "errorCode", "errorMessage"] 6398 for fields_item in kwargs['fields']: 6399 if fields_item not in fields_allowed_values: 6400 raise ValueError( 6401 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 6402 ) 6403 6404 query_params = { 6405 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 6406 } 6407 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 6408 6409 header_params = { 6410 "accept": "application/json", 6411 "content-type": "application/json", 6412 "opc-request-id": kwargs.get("opc_request_id", missing) 6413 } 6414 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6415 6416 retry_strategy = self.base_client.get_preferred_retry_strategy( 6417 operation_retry_strategy=kwargs.get('retry_strategy'), 6418 client_retry_strategy=self.retry_strategy 6419 ) 6420 if retry_strategy is None: 6421 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 6422 6423 if retry_strategy: 6424 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6425 self.base_client.add_opc_client_retries_header(header_params) 6426 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6427 return retry_strategy.make_retrying_call( 6428 self.base_client.call_api, 6429 resource_path=resource_path, 6430 method=method, 6431 path_params=path_params, 6432 query_params=query_params, 6433 header_params=header_params, 6434 response_type="Job") 6435 else: 6436 return self.base_client.call_api( 6437 resource_path=resource_path, 6438 method=method, 6439 path_params=path_params, 6440 query_params=query_params, 6441 header_params=header_params, 6442 response_type="Job") 6443 6444 def get_job_definition(self, catalog_id, job_definition_key, **kwargs): 6445 """ 6446 Gets a specific job definition by key within a data catalog. 6447 6448 6449 :param str catalog_id: (required) 6450 Unique catalog identifier. 6451 6452 :param str job_definition_key: (required) 6453 Unique job definition key. 6454 6455 :param list[str] fields: (optional) 6456 Specifies the fields to return in a job definition response. 6457 6458 Allowed values are: "key", "displayName", "description", "catalogId", "jobType", "isIncremental", "dataAssetKey", "connectionKey", "internalVersion", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "uri", "isSampleDataExtracted", "sampleDataSizeInMBs", "timeLatestExecutionStarted", "timeLatestExecutionEnded", "jobExecutionState", "scheduleType", "properties" 6459 6460 :param str opc_request_id: (optional) 6461 The client request ID for tracing. 6462 6463 :param obj retry_strategy: (optional) 6464 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6465 6466 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6467 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6468 6469 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6470 6471 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobDefinition` 6472 :rtype: :class:`~oci.response.Response` 6473 6474 :example: 6475 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_job_definition.py.html>`__ to see an example of how to use get_job_definition API. 6476 """ 6477 resource_path = "/catalogs/{catalogId}/jobDefinitions/{jobDefinitionKey}" 6478 method = "GET" 6479 6480 # Don't accept unknown kwargs 6481 expected_kwargs = [ 6482 "retry_strategy", 6483 "fields", 6484 "opc_request_id" 6485 ] 6486 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6487 if extra_kwargs: 6488 raise ValueError( 6489 "get_job_definition got unknown kwargs: {!r}".format(extra_kwargs)) 6490 6491 path_params = { 6492 "catalogId": catalog_id, 6493 "jobDefinitionKey": job_definition_key 6494 } 6495 6496 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6497 6498 for (k, v) in six.iteritems(path_params): 6499 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6500 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6501 6502 if 'fields' in kwargs: 6503 fields_allowed_values = ["key", "displayName", "description", "catalogId", "jobType", "isIncremental", "dataAssetKey", "connectionKey", "internalVersion", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "uri", "isSampleDataExtracted", "sampleDataSizeInMBs", "timeLatestExecutionStarted", "timeLatestExecutionEnded", "jobExecutionState", "scheduleType", "properties"] 6504 for fields_item in kwargs['fields']: 6505 if fields_item not in fields_allowed_values: 6506 raise ValueError( 6507 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 6508 ) 6509 6510 query_params = { 6511 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 6512 } 6513 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 6514 6515 header_params = { 6516 "accept": "application/json", 6517 "content-type": "application/json", 6518 "opc-request-id": kwargs.get("opc_request_id", missing) 6519 } 6520 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6521 6522 retry_strategy = self.base_client.get_preferred_retry_strategy( 6523 operation_retry_strategy=kwargs.get('retry_strategy'), 6524 client_retry_strategy=self.retry_strategy 6525 ) 6526 if retry_strategy is None: 6527 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 6528 6529 if retry_strategy: 6530 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6531 self.base_client.add_opc_client_retries_header(header_params) 6532 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6533 return retry_strategy.make_retrying_call( 6534 self.base_client.call_api, 6535 resource_path=resource_path, 6536 method=method, 6537 path_params=path_params, 6538 query_params=query_params, 6539 header_params=header_params, 6540 response_type="JobDefinition") 6541 else: 6542 return self.base_client.call_api( 6543 resource_path=resource_path, 6544 method=method, 6545 path_params=path_params, 6546 query_params=query_params, 6547 header_params=header_params, 6548 response_type="JobDefinition") 6549 6550 def get_job_execution(self, catalog_id, job_key, job_execution_key, **kwargs): 6551 """ 6552 Gets a specific job execution by key. 6553 6554 6555 :param str catalog_id: (required) 6556 Unique catalog identifier. 6557 6558 :param str job_key: (required) 6559 Unique job key. 6560 6561 :param str job_execution_key: (required) 6562 The key of the job execution. 6563 6564 :param list[str] fields: (optional) 6565 Specifies the fields to return in a job execution response. 6566 6567 Allowed values are: "key", "jobKey", "jobType", "subType", "parentKey", "scheduleInstanceKey", "lifecycleState", "timeCreated", "timeStarted", "timeEnded", "errorCode", "errorMessage", "processKey", "externalUrl", "eventKey", "dataEntityKey", "createdById", "updatedById", "properties", "uri" 6568 6569 :param str opc_request_id: (optional) 6570 The client request ID for tracing. 6571 6572 :param obj retry_strategy: (optional) 6573 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6574 6575 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6576 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6577 6578 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6579 6580 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobExecution` 6581 :rtype: :class:`~oci.response.Response` 6582 6583 :example: 6584 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_job_execution.py.html>`__ to see an example of how to use get_job_execution API. 6585 """ 6586 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}/executions/{jobExecutionKey}" 6587 method = "GET" 6588 6589 # Don't accept unknown kwargs 6590 expected_kwargs = [ 6591 "retry_strategy", 6592 "fields", 6593 "opc_request_id" 6594 ] 6595 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6596 if extra_kwargs: 6597 raise ValueError( 6598 "get_job_execution got unknown kwargs: {!r}".format(extra_kwargs)) 6599 6600 path_params = { 6601 "catalogId": catalog_id, 6602 "jobKey": job_key, 6603 "jobExecutionKey": job_execution_key 6604 } 6605 6606 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6607 6608 for (k, v) in six.iteritems(path_params): 6609 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6610 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6611 6612 if 'fields' in kwargs: 6613 fields_allowed_values = ["key", "jobKey", "jobType", "subType", "parentKey", "scheduleInstanceKey", "lifecycleState", "timeCreated", "timeStarted", "timeEnded", "errorCode", "errorMessage", "processKey", "externalUrl", "eventKey", "dataEntityKey", "createdById", "updatedById", "properties", "uri"] 6614 for fields_item in kwargs['fields']: 6615 if fields_item not in fields_allowed_values: 6616 raise ValueError( 6617 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 6618 ) 6619 6620 query_params = { 6621 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 6622 } 6623 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 6624 6625 header_params = { 6626 "accept": "application/json", 6627 "content-type": "application/json", 6628 "opc-request-id": kwargs.get("opc_request_id", missing) 6629 } 6630 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6631 6632 retry_strategy = self.base_client.get_preferred_retry_strategy( 6633 operation_retry_strategy=kwargs.get('retry_strategy'), 6634 client_retry_strategy=self.retry_strategy 6635 ) 6636 if retry_strategy is None: 6637 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 6638 6639 if retry_strategy: 6640 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6641 self.base_client.add_opc_client_retries_header(header_params) 6642 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6643 return retry_strategy.make_retrying_call( 6644 self.base_client.call_api, 6645 resource_path=resource_path, 6646 method=method, 6647 path_params=path_params, 6648 query_params=query_params, 6649 header_params=header_params, 6650 response_type="JobExecution") 6651 else: 6652 return self.base_client.call_api( 6653 resource_path=resource_path, 6654 method=method, 6655 path_params=path_params, 6656 query_params=query_params, 6657 header_params=header_params, 6658 response_type="JobExecution") 6659 6660 def get_job_log(self, catalog_id, job_key, job_execution_key, job_log_key, **kwargs): 6661 """ 6662 Gets a specific job log by key. 6663 6664 6665 :param str catalog_id: (required) 6666 Unique catalog identifier. 6667 6668 :param str job_key: (required) 6669 Unique job key. 6670 6671 :param str job_execution_key: (required) 6672 The key of the job execution. 6673 6674 :param str job_log_key: (required) 6675 Unique job log key. 6676 6677 :param list[str] fields: (optional) 6678 Specifies the fields to return in a job log response. 6679 6680 Allowed values are: "key", "jobExecutionKey", "createdById", "updatedById", "timeUpdated", "timeCreated", "severity", "logMessage", "uri" 6681 6682 :param str opc_request_id: (optional) 6683 The client request ID for tracing. 6684 6685 :param obj retry_strategy: (optional) 6686 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6687 6688 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6689 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6690 6691 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6692 6693 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobLog` 6694 :rtype: :class:`~oci.response.Response` 6695 6696 :example: 6697 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_job_log.py.html>`__ to see an example of how to use get_job_log API. 6698 """ 6699 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}/executions/{jobExecutionKey}/logs/{jobLogKey}" 6700 method = "GET" 6701 6702 # Don't accept unknown kwargs 6703 expected_kwargs = [ 6704 "retry_strategy", 6705 "fields", 6706 "opc_request_id" 6707 ] 6708 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6709 if extra_kwargs: 6710 raise ValueError( 6711 "get_job_log got unknown kwargs: {!r}".format(extra_kwargs)) 6712 6713 path_params = { 6714 "catalogId": catalog_id, 6715 "jobKey": job_key, 6716 "jobExecutionKey": job_execution_key, 6717 "jobLogKey": job_log_key 6718 } 6719 6720 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6721 6722 for (k, v) in six.iteritems(path_params): 6723 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6724 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6725 6726 if 'fields' in kwargs: 6727 fields_allowed_values = ["key", "jobExecutionKey", "createdById", "updatedById", "timeUpdated", "timeCreated", "severity", "logMessage", "uri"] 6728 for fields_item in kwargs['fields']: 6729 if fields_item not in fields_allowed_values: 6730 raise ValueError( 6731 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 6732 ) 6733 6734 query_params = { 6735 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 6736 } 6737 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 6738 6739 header_params = { 6740 "accept": "application/json", 6741 "content-type": "application/json", 6742 "opc-request-id": kwargs.get("opc_request_id", missing) 6743 } 6744 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6745 6746 retry_strategy = self.base_client.get_preferred_retry_strategy( 6747 operation_retry_strategy=kwargs.get('retry_strategy'), 6748 client_retry_strategy=self.retry_strategy 6749 ) 6750 if retry_strategy is None: 6751 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 6752 6753 if retry_strategy: 6754 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6755 self.base_client.add_opc_client_retries_header(header_params) 6756 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6757 return retry_strategy.make_retrying_call( 6758 self.base_client.call_api, 6759 resource_path=resource_path, 6760 method=method, 6761 path_params=path_params, 6762 query_params=query_params, 6763 header_params=header_params, 6764 response_type="JobLog") 6765 else: 6766 return self.base_client.call_api( 6767 resource_path=resource_path, 6768 method=method, 6769 path_params=path_params, 6770 query_params=query_params, 6771 header_params=header_params, 6772 response_type="JobLog") 6773 6774 def get_job_metrics(self, catalog_id, job_key, job_execution_key, job_metrics_key, **kwargs): 6775 """ 6776 Gets a specific job metric by key. 6777 6778 6779 :param str catalog_id: (required) 6780 Unique catalog identifier. 6781 6782 :param str job_key: (required) 6783 Unique job key. 6784 6785 :param str job_execution_key: (required) 6786 The key of the job execution. 6787 6788 :param str job_metrics_key: (required) 6789 Unique job metrics key. 6790 6791 :param list[str] fields: (optional) 6792 Specifies the fields to return in a job metric response. 6793 6794 Allowed values are: "key", "description", "displayName", "timeInserted", "category", "subCategory", "unit", "value", "batchKey", "jobExecutionKey", "createdById", "updatedById", "timeUpdated", "timeCreated", "uri" 6795 6796 :param str opc_request_id: (optional) 6797 The client request ID for tracing. 6798 6799 :param obj retry_strategy: (optional) 6800 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6801 6802 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6803 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6804 6805 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6806 6807 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobMetric` 6808 :rtype: :class:`~oci.response.Response` 6809 6810 :example: 6811 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_job_metrics.py.html>`__ to see an example of how to use get_job_metrics API. 6812 """ 6813 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}/executions/{jobExecutionKey}/metrics/{jobMetricsKey}" 6814 method = "GET" 6815 6816 # Don't accept unknown kwargs 6817 expected_kwargs = [ 6818 "retry_strategy", 6819 "fields", 6820 "opc_request_id" 6821 ] 6822 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6823 if extra_kwargs: 6824 raise ValueError( 6825 "get_job_metrics got unknown kwargs: {!r}".format(extra_kwargs)) 6826 6827 path_params = { 6828 "catalogId": catalog_id, 6829 "jobKey": job_key, 6830 "jobExecutionKey": job_execution_key, 6831 "jobMetricsKey": job_metrics_key 6832 } 6833 6834 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6835 6836 for (k, v) in six.iteritems(path_params): 6837 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6838 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6839 6840 if 'fields' in kwargs: 6841 fields_allowed_values = ["key", "description", "displayName", "timeInserted", "category", "subCategory", "unit", "value", "batchKey", "jobExecutionKey", "createdById", "updatedById", "timeUpdated", "timeCreated", "uri"] 6842 for fields_item in kwargs['fields']: 6843 if fields_item not in fields_allowed_values: 6844 raise ValueError( 6845 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 6846 ) 6847 6848 query_params = { 6849 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 6850 } 6851 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 6852 6853 header_params = { 6854 "accept": "application/json", 6855 "content-type": "application/json", 6856 "opc-request-id": kwargs.get("opc_request_id", missing) 6857 } 6858 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6859 6860 retry_strategy = self.base_client.get_preferred_retry_strategy( 6861 operation_retry_strategy=kwargs.get('retry_strategy'), 6862 client_retry_strategy=self.retry_strategy 6863 ) 6864 if retry_strategy is None: 6865 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 6866 6867 if retry_strategy: 6868 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6869 self.base_client.add_opc_client_retries_header(header_params) 6870 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6871 return retry_strategy.make_retrying_call( 6872 self.base_client.call_api, 6873 resource_path=resource_path, 6874 method=method, 6875 path_params=path_params, 6876 query_params=query_params, 6877 header_params=header_params, 6878 response_type="JobMetric") 6879 else: 6880 return self.base_client.call_api( 6881 resource_path=resource_path, 6882 method=method, 6883 path_params=path_params, 6884 query_params=query_params, 6885 header_params=header_params, 6886 response_type="JobMetric") 6887 6888 def get_metastore(self, metastore_id, **kwargs): 6889 """ 6890 Gets a metastore by identifier. 6891 6892 6893 :param str metastore_id: (required) 6894 The metastore's OCID. 6895 6896 :param str opc_request_id: (optional) 6897 The client request ID for tracing. 6898 6899 :param obj retry_strategy: (optional) 6900 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6901 6902 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6903 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6904 6905 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6906 6907 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Metastore` 6908 :rtype: :class:`~oci.response.Response` 6909 6910 :example: 6911 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_metastore.py.html>`__ to see an example of how to use get_metastore API. 6912 """ 6913 resource_path = "/metastores/{metastoreId}" 6914 method = "GET" 6915 6916 # Don't accept unknown kwargs 6917 expected_kwargs = [ 6918 "retry_strategy", 6919 "opc_request_id" 6920 ] 6921 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 6922 if extra_kwargs: 6923 raise ValueError( 6924 "get_metastore got unknown kwargs: {!r}".format(extra_kwargs)) 6925 6926 path_params = { 6927 "metastoreId": metastore_id 6928 } 6929 6930 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 6931 6932 for (k, v) in six.iteritems(path_params): 6933 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 6934 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 6935 6936 header_params = { 6937 "accept": "application/json", 6938 "content-type": "application/json", 6939 "opc-request-id": kwargs.get("opc_request_id", missing) 6940 } 6941 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 6942 6943 retry_strategy = self.base_client.get_preferred_retry_strategy( 6944 operation_retry_strategy=kwargs.get('retry_strategy'), 6945 client_retry_strategy=self.retry_strategy 6946 ) 6947 if retry_strategy is None: 6948 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 6949 6950 if retry_strategy: 6951 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 6952 self.base_client.add_opc_client_retries_header(header_params) 6953 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 6954 return retry_strategy.make_retrying_call( 6955 self.base_client.call_api, 6956 resource_path=resource_path, 6957 method=method, 6958 path_params=path_params, 6959 header_params=header_params, 6960 response_type="Metastore") 6961 else: 6962 return self.base_client.call_api( 6963 resource_path=resource_path, 6964 method=method, 6965 path_params=path_params, 6966 header_params=header_params, 6967 response_type="Metastore") 6968 6969 def get_namespace(self, catalog_id, namespace_id, **kwargs): 6970 """ 6971 Gets a specific namespace for the given key within a data catalog. 6972 6973 6974 :param str catalog_id: (required) 6975 Unique catalog identifier. 6976 6977 :param str namespace_id: (required) 6978 Unique namespace identifier. 6979 6980 :param list[str] fields: (optional) 6981 Specifies the fields to return in a namespace response. 6982 6983 Allowed values are: "key", "displayName", "description", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "properties" 6984 6985 :param str opc_request_id: (optional) 6986 The client request ID for tracing. 6987 6988 :param obj retry_strategy: (optional) 6989 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 6990 6991 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 6992 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 6993 6994 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 6995 6996 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Namespace` 6997 :rtype: :class:`~oci.response.Response` 6998 6999 :example: 7000 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_namespace.py.html>`__ to see an example of how to use get_namespace API. 7001 """ 7002 resource_path = "/catalogs/{catalogId}/namespaces/{namespaceId}" 7003 method = "GET" 7004 7005 # Don't accept unknown kwargs 7006 expected_kwargs = [ 7007 "retry_strategy", 7008 "fields", 7009 "opc_request_id" 7010 ] 7011 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7012 if extra_kwargs: 7013 raise ValueError( 7014 "get_namespace got unknown kwargs: {!r}".format(extra_kwargs)) 7015 7016 path_params = { 7017 "catalogId": catalog_id, 7018 "namespaceId": namespace_id 7019 } 7020 7021 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7022 7023 for (k, v) in six.iteritems(path_params): 7024 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7025 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7026 7027 if 'fields' in kwargs: 7028 fields_allowed_values = ["key", "displayName", "description", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "properties"] 7029 for fields_item in kwargs['fields']: 7030 if fields_item not in fields_allowed_values: 7031 raise ValueError( 7032 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 7033 ) 7034 7035 query_params = { 7036 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 7037 } 7038 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 7039 7040 header_params = { 7041 "accept": "application/json", 7042 "content-type": "application/json", 7043 "opc-request-id": kwargs.get("opc_request_id", missing) 7044 } 7045 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7046 7047 retry_strategy = self.base_client.get_preferred_retry_strategy( 7048 operation_retry_strategy=kwargs.get('retry_strategy'), 7049 client_retry_strategy=self.retry_strategy 7050 ) 7051 if retry_strategy is None: 7052 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 7053 7054 if retry_strategy: 7055 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7056 self.base_client.add_opc_client_retries_header(header_params) 7057 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7058 return retry_strategy.make_retrying_call( 7059 self.base_client.call_api, 7060 resource_path=resource_path, 7061 method=method, 7062 path_params=path_params, 7063 query_params=query_params, 7064 header_params=header_params, 7065 response_type="Namespace") 7066 else: 7067 return self.base_client.call_api( 7068 resource_path=resource_path, 7069 method=method, 7070 path_params=path_params, 7071 query_params=query_params, 7072 header_params=header_params, 7073 response_type="Namespace") 7074 7075 def get_pattern(self, catalog_id, pattern_key, **kwargs): 7076 """ 7077 Gets a specific pattern for the given key within a data catalog. 7078 7079 7080 :param str catalog_id: (required) 7081 Unique catalog identifier. 7082 7083 :param str pattern_key: (required) 7084 Unique pattern key. 7085 7086 :param list[str] fields: (optional) 7087 Specifies the fields to return in a pattern response. 7088 7089 Allowed values are: "key", "displayName", "description", "catalogId", "expression", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "properties" 7090 7091 :param str opc_request_id: (optional) 7092 The client request ID for tracing. 7093 7094 :param obj retry_strategy: (optional) 7095 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7096 7097 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 7098 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7099 7100 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7101 7102 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Pattern` 7103 :rtype: :class:`~oci.response.Response` 7104 7105 :example: 7106 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_pattern.py.html>`__ to see an example of how to use get_pattern API. 7107 """ 7108 resource_path = "/catalogs/{catalogId}/patterns/{patternKey}" 7109 method = "GET" 7110 7111 # Don't accept unknown kwargs 7112 expected_kwargs = [ 7113 "retry_strategy", 7114 "fields", 7115 "opc_request_id" 7116 ] 7117 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7118 if extra_kwargs: 7119 raise ValueError( 7120 "get_pattern got unknown kwargs: {!r}".format(extra_kwargs)) 7121 7122 path_params = { 7123 "catalogId": catalog_id, 7124 "patternKey": pattern_key 7125 } 7126 7127 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7128 7129 for (k, v) in six.iteritems(path_params): 7130 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7131 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7132 7133 if 'fields' in kwargs: 7134 fields_allowed_values = ["key", "displayName", "description", "catalogId", "expression", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "properties"] 7135 for fields_item in kwargs['fields']: 7136 if fields_item not in fields_allowed_values: 7137 raise ValueError( 7138 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 7139 ) 7140 7141 query_params = { 7142 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 7143 } 7144 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 7145 7146 header_params = { 7147 "accept": "application/json", 7148 "content-type": "application/json", 7149 "opc-request-id": kwargs.get("opc_request_id", missing) 7150 } 7151 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7152 7153 retry_strategy = self.base_client.get_preferred_retry_strategy( 7154 operation_retry_strategy=kwargs.get('retry_strategy'), 7155 client_retry_strategy=self.retry_strategy 7156 ) 7157 if retry_strategy is None: 7158 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 7159 7160 if retry_strategy: 7161 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7162 self.base_client.add_opc_client_retries_header(header_params) 7163 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7164 return retry_strategy.make_retrying_call( 7165 self.base_client.call_api, 7166 resource_path=resource_path, 7167 method=method, 7168 path_params=path_params, 7169 query_params=query_params, 7170 header_params=header_params, 7171 response_type="Pattern") 7172 else: 7173 return self.base_client.call_api( 7174 resource_path=resource_path, 7175 method=method, 7176 path_params=path_params, 7177 query_params=query_params, 7178 header_params=header_params, 7179 response_type="Pattern") 7180 7181 def get_term(self, catalog_id, glossary_key, term_key, **kwargs): 7182 """ 7183 Gets a specific glossary term by key. 7184 7185 7186 :param str catalog_id: (required) 7187 Unique catalog identifier. 7188 7189 :param str glossary_key: (required) 7190 Unique glossary key. 7191 7192 :param str term_key: (required) 7193 Unique glossary term key. 7194 7195 :param list[str] fields: (optional) 7196 Specifies the fields to return in a term response. 7197 7198 Allowed values are: "key", "displayName", "description", "glossaryKey", "parentTermKey", "isAllowedToHaveChildTerms", "path", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "owner", "workflowStatus", "uri", "relatedTerms", "associatedObjectCount", "associatedObjects" 7199 7200 :param str opc_request_id: (optional) 7201 The client request ID for tracing. 7202 7203 :param obj retry_strategy: (optional) 7204 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7205 7206 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 7207 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7208 7209 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7210 7211 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Term` 7212 :rtype: :class:`~oci.response.Response` 7213 7214 :example: 7215 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_term.py.html>`__ to see an example of how to use get_term API. 7216 """ 7217 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms/{termKey}" 7218 method = "GET" 7219 7220 # Don't accept unknown kwargs 7221 expected_kwargs = [ 7222 "retry_strategy", 7223 "fields", 7224 "opc_request_id" 7225 ] 7226 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7227 if extra_kwargs: 7228 raise ValueError( 7229 "get_term got unknown kwargs: {!r}".format(extra_kwargs)) 7230 7231 path_params = { 7232 "catalogId": catalog_id, 7233 "glossaryKey": glossary_key, 7234 "termKey": term_key 7235 } 7236 7237 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7238 7239 for (k, v) in six.iteritems(path_params): 7240 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7241 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7242 7243 if 'fields' in kwargs: 7244 fields_allowed_values = ["key", "displayName", "description", "glossaryKey", "parentTermKey", "isAllowedToHaveChildTerms", "path", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "owner", "workflowStatus", "uri", "relatedTerms", "associatedObjectCount", "associatedObjects"] 7245 for fields_item in kwargs['fields']: 7246 if fields_item not in fields_allowed_values: 7247 raise ValueError( 7248 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 7249 ) 7250 7251 query_params = { 7252 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 7253 } 7254 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 7255 7256 header_params = { 7257 "accept": "application/json", 7258 "content-type": "application/json", 7259 "opc-request-id": kwargs.get("opc_request_id", missing) 7260 } 7261 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7262 7263 retry_strategy = self.base_client.get_preferred_retry_strategy( 7264 operation_retry_strategy=kwargs.get('retry_strategy'), 7265 client_retry_strategy=self.retry_strategy 7266 ) 7267 if retry_strategy is None: 7268 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 7269 7270 if retry_strategy: 7271 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7272 self.base_client.add_opc_client_retries_header(header_params) 7273 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7274 return retry_strategy.make_retrying_call( 7275 self.base_client.call_api, 7276 resource_path=resource_path, 7277 method=method, 7278 path_params=path_params, 7279 query_params=query_params, 7280 header_params=header_params, 7281 response_type="Term") 7282 else: 7283 return self.base_client.call_api( 7284 resource_path=resource_path, 7285 method=method, 7286 path_params=path_params, 7287 query_params=query_params, 7288 header_params=header_params, 7289 response_type="Term") 7290 7291 def get_term_relationship(self, catalog_id, glossary_key, term_key, term_relationship_key, **kwargs): 7292 """ 7293 Gets a specific glossary term relationship by key. 7294 7295 7296 :param str catalog_id: (required) 7297 Unique catalog identifier. 7298 7299 :param str glossary_key: (required) 7300 Unique glossary key. 7301 7302 :param str term_key: (required) 7303 Unique glossary term key. 7304 7305 :param str term_relationship_key: (required) 7306 Unique glossary term relationship key. 7307 7308 :param list[str] fields: (optional) 7309 Specifies the fields to return in a term relationship response. 7310 7311 Allowed values are: "key", "displayName", "description", "relatedTermKey", "relatedTermDisplayName", "parentTermKey", "parentTermDisplayName", "lifecycleState", "timeCreated", "uri" 7312 7313 :param str opc_request_id: (optional) 7314 The client request ID for tracing. 7315 7316 :param obj retry_strategy: (optional) 7317 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7318 7319 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 7320 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7321 7322 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7323 7324 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.TermRelationship` 7325 :rtype: :class:`~oci.response.Response` 7326 7327 :example: 7328 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_term_relationship.py.html>`__ to see an example of how to use get_term_relationship API. 7329 """ 7330 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms/{termKey}/termRelationships/{termRelationshipKey}" 7331 method = "GET" 7332 7333 # Don't accept unknown kwargs 7334 expected_kwargs = [ 7335 "retry_strategy", 7336 "fields", 7337 "opc_request_id" 7338 ] 7339 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7340 if extra_kwargs: 7341 raise ValueError( 7342 "get_term_relationship got unknown kwargs: {!r}".format(extra_kwargs)) 7343 7344 path_params = { 7345 "catalogId": catalog_id, 7346 "glossaryKey": glossary_key, 7347 "termKey": term_key, 7348 "termRelationshipKey": term_relationship_key 7349 } 7350 7351 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7352 7353 for (k, v) in six.iteritems(path_params): 7354 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7355 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7356 7357 if 'fields' in kwargs: 7358 fields_allowed_values = ["key", "displayName", "description", "relatedTermKey", "relatedTermDisplayName", "parentTermKey", "parentTermDisplayName", "lifecycleState", "timeCreated", "uri"] 7359 for fields_item in kwargs['fields']: 7360 if fields_item not in fields_allowed_values: 7361 raise ValueError( 7362 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 7363 ) 7364 7365 query_params = { 7366 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 7367 } 7368 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 7369 7370 header_params = { 7371 "accept": "application/json", 7372 "content-type": "application/json", 7373 "opc-request-id": kwargs.get("opc_request_id", missing) 7374 } 7375 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7376 7377 retry_strategy = self.base_client.get_preferred_retry_strategy( 7378 operation_retry_strategy=kwargs.get('retry_strategy'), 7379 client_retry_strategy=self.retry_strategy 7380 ) 7381 if retry_strategy is None: 7382 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 7383 7384 if retry_strategy: 7385 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7386 self.base_client.add_opc_client_retries_header(header_params) 7387 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7388 return retry_strategy.make_retrying_call( 7389 self.base_client.call_api, 7390 resource_path=resource_path, 7391 method=method, 7392 path_params=path_params, 7393 query_params=query_params, 7394 header_params=header_params, 7395 response_type="TermRelationship") 7396 else: 7397 return self.base_client.call_api( 7398 resource_path=resource_path, 7399 method=method, 7400 path_params=path_params, 7401 query_params=query_params, 7402 header_params=header_params, 7403 response_type="TermRelationship") 7404 7405 def get_type(self, catalog_id, type_key, **kwargs): 7406 """ 7407 Gets a specific type by key within a data catalog. 7408 7409 7410 :param str catalog_id: (required) 7411 Unique catalog identifier. 7412 7413 :param str type_key: (required) 7414 Unique type key. 7415 7416 :param list[str] fields: (optional) 7417 Specifies the fields to return in a type response. 7418 7419 Allowed values are: "key", "description", "name", "catalogId", "properties", "isInternal", "isTag", "isApproved", "typeCategory", "externalTypeName", "lifecycleState", "uri" 7420 7421 :param str opc_request_id: (optional) 7422 The client request ID for tracing. 7423 7424 :param obj retry_strategy: (optional) 7425 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7426 7427 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 7428 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7429 7430 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7431 7432 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Type` 7433 :rtype: :class:`~oci.response.Response` 7434 7435 :example: 7436 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_type.py.html>`__ to see an example of how to use get_type API. 7437 """ 7438 resource_path = "/catalogs/{catalogId}/types/{typeKey}" 7439 method = "GET" 7440 7441 # Don't accept unknown kwargs 7442 expected_kwargs = [ 7443 "retry_strategy", 7444 "fields", 7445 "opc_request_id" 7446 ] 7447 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7448 if extra_kwargs: 7449 raise ValueError( 7450 "get_type got unknown kwargs: {!r}".format(extra_kwargs)) 7451 7452 path_params = { 7453 "catalogId": catalog_id, 7454 "typeKey": type_key 7455 } 7456 7457 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7458 7459 for (k, v) in six.iteritems(path_params): 7460 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7461 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7462 7463 if 'fields' in kwargs: 7464 fields_allowed_values = ["key", "description", "name", "catalogId", "properties", "isInternal", "isTag", "isApproved", "typeCategory", "externalTypeName", "lifecycleState", "uri"] 7465 for fields_item in kwargs['fields']: 7466 if fields_item not in fields_allowed_values: 7467 raise ValueError( 7468 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 7469 ) 7470 7471 query_params = { 7472 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') 7473 } 7474 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 7475 7476 header_params = { 7477 "accept": "application/json", 7478 "content-type": "application/json", 7479 "opc-request-id": kwargs.get("opc_request_id", missing) 7480 } 7481 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7482 7483 retry_strategy = self.base_client.get_preferred_retry_strategy( 7484 operation_retry_strategy=kwargs.get('retry_strategy'), 7485 client_retry_strategy=self.retry_strategy 7486 ) 7487 if retry_strategy is None: 7488 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 7489 7490 if retry_strategy: 7491 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7492 self.base_client.add_opc_client_retries_header(header_params) 7493 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7494 return retry_strategy.make_retrying_call( 7495 self.base_client.call_api, 7496 resource_path=resource_path, 7497 method=method, 7498 path_params=path_params, 7499 query_params=query_params, 7500 header_params=header_params, 7501 response_type="Type") 7502 else: 7503 return self.base_client.call_api( 7504 resource_path=resource_path, 7505 method=method, 7506 path_params=path_params, 7507 query_params=query_params, 7508 header_params=header_params, 7509 response_type="Type") 7510 7511 def get_work_request(self, work_request_id, **kwargs): 7512 """ 7513 Gets the status of the work request with the given OCID. 7514 7515 7516 :param str work_request_id: (required) 7517 The OCID of the asynchronous request. 7518 7519 :param str opc_request_id: (optional) 7520 The client request ID for tracing. 7521 7522 :param obj retry_strategy: (optional) 7523 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7524 7525 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 7526 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7527 7528 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7529 7530 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.WorkRequest` 7531 :rtype: :class:`~oci.response.Response` 7532 7533 :example: 7534 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/get_work_request.py.html>`__ to see an example of how to use get_work_request API. 7535 """ 7536 resource_path = "/workRequests/{workRequestId}" 7537 method = "GET" 7538 7539 # Don't accept unknown kwargs 7540 expected_kwargs = [ 7541 "retry_strategy", 7542 "opc_request_id" 7543 ] 7544 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7545 if extra_kwargs: 7546 raise ValueError( 7547 "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) 7548 7549 path_params = { 7550 "workRequestId": work_request_id 7551 } 7552 7553 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7554 7555 for (k, v) in six.iteritems(path_params): 7556 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7557 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7558 7559 header_params = { 7560 "accept": "application/json", 7561 "content-type": "application/json", 7562 "opc-request-id": kwargs.get("opc_request_id", missing) 7563 } 7564 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7565 7566 retry_strategy = self.base_client.get_preferred_retry_strategy( 7567 operation_retry_strategy=kwargs.get('retry_strategy'), 7568 client_retry_strategy=self.retry_strategy 7569 ) 7570 if retry_strategy is None: 7571 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 7572 7573 if retry_strategy: 7574 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7575 self.base_client.add_opc_client_retries_header(header_params) 7576 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7577 return retry_strategy.make_retrying_call( 7578 self.base_client.call_api, 7579 resource_path=resource_path, 7580 method=method, 7581 path_params=path_params, 7582 header_params=header_params, 7583 response_type="WorkRequest") 7584 else: 7585 return self.base_client.call_api( 7586 resource_path=resource_path, 7587 method=method, 7588 path_params=path_params, 7589 header_params=header_params, 7590 response_type="WorkRequest") 7591 7592 def import_connection(self, catalog_id, data_asset_key, import_connection_details, **kwargs): 7593 """ 7594 Import new connection for this data asset. 7595 7596 7597 :param str catalog_id: (required) 7598 Unique catalog identifier. 7599 7600 :param str data_asset_key: (required) 7601 Unique data asset key. 7602 7603 :param oci.data_catalog.models.ImportConnectionDetails import_connection_details: (required) 7604 The information used to create the connections through import. 7605 7606 :param str opc_request_id: (optional) 7607 The client request ID for tracing. 7608 7609 :param str if_match: (optional) 7610 For optimistic concurrency control. In the PUT or DELETE call 7611 for a resource, set the `if-match` parameter to the value of the 7612 etag from a previous GET or POST response for that resource. 7613 The resource will be updated or deleted only if the etag you 7614 provide matches the resource's current etag value. 7615 7616 :param str opc_retry_token: (optional) 7617 A token that uniquely identifies a request so it can be retried in case of a timeout or 7618 server error without risk of executing that same action again. Retry tokens expire after 24 7619 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 7620 has been deleted and purged from the system, then a retry of the original creation request 7621 might be rejected. 7622 7623 :param obj retry_strategy: (optional) 7624 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7625 7626 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 7627 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7628 7629 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7630 7631 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Connection` 7632 :rtype: :class:`~oci.response.Response` 7633 7634 :example: 7635 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/import_connection.py.html>`__ to see an example of how to use import_connection API. 7636 """ 7637 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/actions/importConnection" 7638 method = "POST" 7639 7640 # Don't accept unknown kwargs 7641 expected_kwargs = [ 7642 "retry_strategy", 7643 "opc_request_id", 7644 "if_match", 7645 "opc_retry_token" 7646 ] 7647 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7648 if extra_kwargs: 7649 raise ValueError( 7650 "import_connection got unknown kwargs: {!r}".format(extra_kwargs)) 7651 7652 path_params = { 7653 "catalogId": catalog_id, 7654 "dataAssetKey": data_asset_key 7655 } 7656 7657 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7658 7659 for (k, v) in six.iteritems(path_params): 7660 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7661 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7662 7663 header_params = { 7664 "accept": "application/json", 7665 "content-type": "application/json", 7666 "opc-request-id": kwargs.get("opc_request_id", missing), 7667 "if-match": kwargs.get("if_match", missing), 7668 "opc-retry-token": kwargs.get("opc_retry_token", missing) 7669 } 7670 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7671 7672 retry_strategy = self.base_client.get_preferred_retry_strategy( 7673 operation_retry_strategy=kwargs.get('retry_strategy'), 7674 client_retry_strategy=self.retry_strategy 7675 ) 7676 7677 if retry_strategy: 7678 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7679 self.base_client.add_opc_retry_token_if_needed(header_params) 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 body=import_connection_details, 7689 response_type="Connection") 7690 else: 7691 return self.base_client.call_api( 7692 resource_path=resource_path, 7693 method=method, 7694 path_params=path_params, 7695 header_params=header_params, 7696 body=import_connection_details, 7697 response_type="Connection") 7698 7699 def import_data_asset(self, catalog_id, data_asset_key, import_data_asset_details, import_type, **kwargs): 7700 """ 7701 Import technical objects to a Data Asset 7702 7703 7704 :param str catalog_id: (required) 7705 Unique catalog identifier. 7706 7707 :param str data_asset_key: (required) 7708 Unique data asset key. 7709 7710 :param oci.data_catalog.models.ImportDataAssetDetails import_data_asset_details: (required) 7711 The file contents to be imported. 7712 7713 :param oci.data_catalog.models.list[str] import_type: (required) 7714 Type of import. 7715 7716 Allowed values are: "CUSTOM_PROPERTY_VALUES", "ALL" 7717 7718 :param bool is_missing_value_ignored: (optional) 7719 Specify whether to ignore the missing values in the import file. 7720 7721 :param str opc_request_id: (optional) 7722 The client request ID for tracing. 7723 7724 :param str opc_retry_token: (optional) 7725 A token that uniquely identifies a request so it can be retried in case of a timeout or 7726 server error without risk of executing that same action again. Retry tokens expire after 24 7727 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 7728 has been deleted and purged from the system, then a retry of the original creation request 7729 might be rejected. 7730 7731 :param obj retry_strategy: (optional) 7732 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7733 7734 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 7735 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7736 7737 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7738 7739 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.ImportDataAssetJobResult` 7740 :rtype: :class:`~oci.response.Response` 7741 7742 :example: 7743 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/import_data_asset.py.html>`__ to see an example of how to use import_data_asset API. 7744 """ 7745 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/actions/import" 7746 method = "POST" 7747 7748 # Don't accept unknown kwargs 7749 expected_kwargs = [ 7750 "retry_strategy", 7751 "is_missing_value_ignored", 7752 "opc_request_id", 7753 "opc_retry_token" 7754 ] 7755 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7756 if extra_kwargs: 7757 raise ValueError( 7758 "import_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) 7759 7760 path_params = { 7761 "catalogId": catalog_id, 7762 "dataAssetKey": data_asset_key 7763 } 7764 7765 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7766 7767 for (k, v) in six.iteritems(path_params): 7768 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7769 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7770 7771 import_type_allowed_values = ["CUSTOM_PROPERTY_VALUES", "ALL"] 7772 for import_type_item in import_type: 7773 if import_type_item not in import_type_allowed_values: 7774 raise ValueError( 7775 "Invalid value for `import_type`, must be one of {0}".format(import_type_allowed_values) 7776 ) 7777 7778 query_params = { 7779 "importType": self.base_client.generate_collection_format_param(import_type, 'multi'), 7780 "isMissingValueIgnored": kwargs.get("is_missing_value_ignored", missing) 7781 } 7782 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 7783 7784 header_params = { 7785 "accept": "application/json", 7786 "content-type": "application/json", 7787 "opc-request-id": kwargs.get("opc_request_id", missing), 7788 "opc-retry-token": kwargs.get("opc_retry_token", missing) 7789 } 7790 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7791 7792 retry_strategy = self.base_client.get_preferred_retry_strategy( 7793 operation_retry_strategy=kwargs.get('retry_strategy'), 7794 client_retry_strategy=self.retry_strategy 7795 ) 7796 7797 if retry_strategy: 7798 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7799 self.base_client.add_opc_retry_token_if_needed(header_params) 7800 self.base_client.add_opc_client_retries_header(header_params) 7801 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7802 return retry_strategy.make_retrying_call( 7803 self.base_client.call_api, 7804 resource_path=resource_path, 7805 method=method, 7806 path_params=path_params, 7807 query_params=query_params, 7808 header_params=header_params, 7809 body=import_data_asset_details, 7810 response_type="ImportDataAssetJobResult") 7811 else: 7812 return self.base_client.call_api( 7813 resource_path=resource_path, 7814 method=method, 7815 path_params=path_params, 7816 query_params=query_params, 7817 header_params=header_params, 7818 body=import_data_asset_details, 7819 response_type="ImportDataAssetJobResult") 7820 7821 def import_glossary(self, catalog_id, glossary_key, import_glossary_details, **kwargs): 7822 """ 7823 Import the glossary and the terms from csv or json files and return the imported glossary resource. 7824 7825 7826 :param str catalog_id: (required) 7827 Unique catalog identifier. 7828 7829 :param str glossary_key: (required) 7830 Unique glossary key. 7831 7832 :param oci.data_catalog.models.ImportGlossaryDetails import_glossary_details: (required) 7833 The file contents to import the glossary. 7834 7835 :param bool is_relationship_imported: (optional) 7836 Specify if the relationship metadata is imported for the glossary. 7837 7838 :param str opc_request_id: (optional) 7839 The client request ID for tracing. 7840 7841 :param str opc_retry_token: (optional) 7842 A token that uniquely identifies a request so it can be retried in case of a timeout or 7843 server error without risk of executing that same action again. Retry tokens expire after 24 7844 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 7845 has been deleted and purged from the system, then a retry of the original creation request 7846 might be rejected. 7847 7848 :param obj retry_strategy: (optional) 7849 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7850 7851 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 7852 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7853 7854 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7855 7856 :return: A :class:`~oci.response.Response` object with data of type None 7857 :rtype: :class:`~oci.response.Response` 7858 7859 :example: 7860 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/import_glossary.py.html>`__ to see an example of how to use import_glossary API. 7861 """ 7862 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/actions/import" 7863 method = "POST" 7864 7865 # Don't accept unknown kwargs 7866 expected_kwargs = [ 7867 "retry_strategy", 7868 "is_relationship_imported", 7869 "opc_request_id", 7870 "opc_retry_token" 7871 ] 7872 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 7873 if extra_kwargs: 7874 raise ValueError( 7875 "import_glossary got unknown kwargs: {!r}".format(extra_kwargs)) 7876 7877 path_params = { 7878 "catalogId": catalog_id, 7879 "glossaryKey": glossary_key 7880 } 7881 7882 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 7883 7884 for (k, v) in six.iteritems(path_params): 7885 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 7886 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 7887 7888 query_params = { 7889 "isRelationshipImported": kwargs.get("is_relationship_imported", missing) 7890 } 7891 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 7892 7893 header_params = { 7894 "accept": "application/json", 7895 "content-type": "application/json", 7896 "opc-request-id": kwargs.get("opc_request_id", missing), 7897 "opc-retry-token": kwargs.get("opc_retry_token", missing) 7898 } 7899 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 7900 7901 retry_strategy = self.base_client.get_preferred_retry_strategy( 7902 operation_retry_strategy=kwargs.get('retry_strategy'), 7903 client_retry_strategy=self.retry_strategy 7904 ) 7905 7906 if retry_strategy: 7907 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 7908 self.base_client.add_opc_retry_token_if_needed(header_params) 7909 self.base_client.add_opc_client_retries_header(header_params) 7910 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 7911 return retry_strategy.make_retrying_call( 7912 self.base_client.call_api, 7913 resource_path=resource_path, 7914 method=method, 7915 path_params=path_params, 7916 query_params=query_params, 7917 header_params=header_params, 7918 body=import_glossary_details) 7919 else: 7920 return self.base_client.call_api( 7921 resource_path=resource_path, 7922 method=method, 7923 path_params=path_params, 7924 query_params=query_params, 7925 header_params=header_params, 7926 body=import_glossary_details) 7927 7928 def list_aggregated_physical_entities(self, catalog_id, data_asset_key, entity_key, **kwargs): 7929 """ 7930 List the physical entities aggregated by this logical entity. 7931 7932 7933 :param str catalog_id: (required) 7934 Unique catalog identifier. 7935 7936 :param str data_asset_key: (required) 7937 Unique data asset key. 7938 7939 :param str entity_key: (required) 7940 Unique entity key. 7941 7942 :param list[str] fields: (optional) 7943 Specifies the fields to return in an entity response. 7944 7945 Allowed values are: "key", "displayName", "description", "dataAssetKey", "timeCreated", "timeUpdated", "createdById", "updatedById", "lifecycleState", "externalKey", "timeExternal", "timeStatusUpdated", "isLogical", "isPartition", "folderKey", "folderName", "typeKey", "path", "harvestStatus", "lastJobKey", "uri", "properties" 7946 7947 :param str display_name_contains: (optional) 7948 A filter to return only resources that match display name pattern given. The match is not case sensitive. 7949 For Example : /folders?displayNameContains=Cu.* 7950 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 7951 7952 :param str sort_by: (optional) 7953 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 7954 7955 Allowed values are: "TIMECREATED", "DISPLAYNAME" 7956 7957 :param str sort_order: (optional) 7958 The sort order to use, either 'asc' or 'desc'. 7959 7960 Allowed values are: "ASC", "DESC" 7961 7962 :param int limit: (optional) 7963 The maximum number of items to return. 7964 7965 :param str page: (optional) 7966 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 7967 7968 :param bool is_include_properties: (optional) 7969 Indicates whether the properties map will be provided in the response. 7970 7971 :param str opc_request_id: (optional) 7972 The client request ID for tracing. 7973 7974 :param obj retry_strategy: (optional) 7975 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 7976 7977 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 7978 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 7979 7980 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 7981 7982 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.EntityCollection` 7983 :rtype: :class:`~oci.response.Response` 7984 7985 :example: 7986 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_aggregated_physical_entities.py.html>`__ to see an example of how to use list_aggregated_physical_entities API. 7987 """ 7988 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/actions/listAggregatedPhysicalEntities" 7989 method = "POST" 7990 7991 # Don't accept unknown kwargs 7992 expected_kwargs = [ 7993 "retry_strategy", 7994 "fields", 7995 "display_name_contains", 7996 "sort_by", 7997 "sort_order", 7998 "limit", 7999 "page", 8000 "is_include_properties", 8001 "opc_request_id" 8002 ] 8003 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8004 if extra_kwargs: 8005 raise ValueError( 8006 "list_aggregated_physical_entities got unknown kwargs: {!r}".format(extra_kwargs)) 8007 8008 path_params = { 8009 "catalogId": catalog_id, 8010 "dataAssetKey": data_asset_key, 8011 "entityKey": entity_key 8012 } 8013 8014 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8015 8016 for (k, v) in six.iteritems(path_params): 8017 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8018 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8019 8020 if 'fields' in kwargs: 8021 fields_allowed_values = ["key", "displayName", "description", "dataAssetKey", "timeCreated", "timeUpdated", "createdById", "updatedById", "lifecycleState", "externalKey", "timeExternal", "timeStatusUpdated", "isLogical", "isPartition", "folderKey", "folderName", "typeKey", "path", "harvestStatus", "lastJobKey", "uri", "properties"] 8022 for fields_item in kwargs['fields']: 8023 if fields_item not in fields_allowed_values: 8024 raise ValueError( 8025 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 8026 ) 8027 8028 if 'sort_by' in kwargs: 8029 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 8030 if kwargs['sort_by'] not in sort_by_allowed_values: 8031 raise ValueError( 8032 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 8033 ) 8034 8035 if 'sort_order' in kwargs: 8036 sort_order_allowed_values = ["ASC", "DESC"] 8037 if kwargs['sort_order'] not in sort_order_allowed_values: 8038 raise ValueError( 8039 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 8040 ) 8041 8042 query_params = { 8043 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 8044 "displayNameContains": kwargs.get("display_name_contains", missing), 8045 "sortBy": kwargs.get("sort_by", missing), 8046 "sortOrder": kwargs.get("sort_order", missing), 8047 "limit": kwargs.get("limit", missing), 8048 "page": kwargs.get("page", missing), 8049 "isIncludeProperties": kwargs.get("is_include_properties", missing) 8050 } 8051 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 8052 8053 header_params = { 8054 "accept": "application/json", 8055 "content-type": "application/json", 8056 "opc-request-id": kwargs.get("opc_request_id", missing) 8057 } 8058 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8059 8060 retry_strategy = self.base_client.get_preferred_retry_strategy( 8061 operation_retry_strategy=kwargs.get('retry_strategy'), 8062 client_retry_strategy=self.retry_strategy 8063 ) 8064 if retry_strategy is None: 8065 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 8066 8067 if retry_strategy: 8068 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8069 self.base_client.add_opc_client_retries_header(header_params) 8070 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8071 return retry_strategy.make_retrying_call( 8072 self.base_client.call_api, 8073 resource_path=resource_path, 8074 method=method, 8075 path_params=path_params, 8076 query_params=query_params, 8077 header_params=header_params, 8078 response_type="EntityCollection") 8079 else: 8080 return self.base_client.call_api( 8081 resource_path=resource_path, 8082 method=method, 8083 path_params=path_params, 8084 query_params=query_params, 8085 header_params=header_params, 8086 response_type="EntityCollection") 8087 8088 def list_attribute_tags(self, catalog_id, data_asset_key, entity_key, attribute_key, **kwargs): 8089 """ 8090 Returns a list of all tags for an entity attribute. 8091 8092 8093 :param str catalog_id: (required) 8094 Unique catalog identifier. 8095 8096 :param str data_asset_key: (required) 8097 Unique data asset key. 8098 8099 :param str entity_key: (required) 8100 Unique entity key. 8101 8102 :param str attribute_key: (required) 8103 Unique attribute key. 8104 8105 :param str name: (optional) 8106 Immutable resource name. 8107 8108 :param str lifecycle_state: (optional) 8109 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 8110 8111 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 8112 8113 :param str term_key: (optional) 8114 Unique key of the related term. 8115 8116 :param str term_path: (optional) 8117 Path of the related term. 8118 8119 :param datetime time_created: (optional) 8120 Time that the resource was created. An `RFC3339`__ formatted datetime string. 8121 8122 __ https://tools.ietf.org/html/rfc3339 8123 8124 :param str created_by_id: (optional) 8125 OCID of the user who created the resource. 8126 8127 :param list[str] fields: (optional) 8128 Specifies the fields to return in an entity attribute tag summary response. 8129 8130 Allowed values are: "key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "uri", "glossaryKey", "attributeKey" 8131 8132 :param str sort_by: (optional) 8133 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 8134 8135 Allowed values are: "TIMECREATED", "DISPLAYNAME" 8136 8137 :param str sort_order: (optional) 8138 The sort order to use, either 'asc' or 'desc'. 8139 8140 Allowed values are: "ASC", "DESC" 8141 8142 :param int limit: (optional) 8143 The maximum number of items to return. 8144 8145 :param str page: (optional) 8146 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 8147 8148 :param str opc_request_id: (optional) 8149 The client request ID for tracing. 8150 8151 :param obj retry_strategy: (optional) 8152 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8153 8154 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 8155 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8156 8157 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8158 8159 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.AttributeTagCollection` 8160 :rtype: :class:`~oci.response.Response` 8161 8162 :example: 8163 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_attribute_tags.py.html>`__ to see an example of how to use list_attribute_tags API. 8164 """ 8165 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/attributes/{attributeKey}/tags" 8166 method = "GET" 8167 8168 # Don't accept unknown kwargs 8169 expected_kwargs = [ 8170 "retry_strategy", 8171 "name", 8172 "lifecycle_state", 8173 "term_key", 8174 "term_path", 8175 "time_created", 8176 "created_by_id", 8177 "fields", 8178 "sort_by", 8179 "sort_order", 8180 "limit", 8181 "page", 8182 "opc_request_id" 8183 ] 8184 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8185 if extra_kwargs: 8186 raise ValueError( 8187 "list_attribute_tags got unknown kwargs: {!r}".format(extra_kwargs)) 8188 8189 path_params = { 8190 "catalogId": catalog_id, 8191 "dataAssetKey": data_asset_key, 8192 "entityKey": entity_key, 8193 "attributeKey": attribute_key 8194 } 8195 8196 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8197 8198 for (k, v) in six.iteritems(path_params): 8199 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8200 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8201 8202 if 'lifecycle_state' in kwargs: 8203 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 8204 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 8205 raise ValueError( 8206 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 8207 ) 8208 8209 if 'fields' in kwargs: 8210 fields_allowed_values = ["key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "uri", "glossaryKey", "attributeKey"] 8211 for fields_item in kwargs['fields']: 8212 if fields_item not in fields_allowed_values: 8213 raise ValueError( 8214 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 8215 ) 8216 8217 if 'sort_by' in kwargs: 8218 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 8219 if kwargs['sort_by'] not in sort_by_allowed_values: 8220 raise ValueError( 8221 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 8222 ) 8223 8224 if 'sort_order' in kwargs: 8225 sort_order_allowed_values = ["ASC", "DESC"] 8226 if kwargs['sort_order'] not in sort_order_allowed_values: 8227 raise ValueError( 8228 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 8229 ) 8230 8231 query_params = { 8232 "name": kwargs.get("name", missing), 8233 "lifecycleState": kwargs.get("lifecycle_state", missing), 8234 "termKey": kwargs.get("term_key", missing), 8235 "termPath": kwargs.get("term_path", missing), 8236 "timeCreated": kwargs.get("time_created", missing), 8237 "createdById": kwargs.get("created_by_id", missing), 8238 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 8239 "sortBy": kwargs.get("sort_by", missing), 8240 "sortOrder": kwargs.get("sort_order", missing), 8241 "limit": kwargs.get("limit", missing), 8242 "page": kwargs.get("page", missing) 8243 } 8244 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 8245 8246 header_params = { 8247 "accept": "application/json", 8248 "content-type": "application/json", 8249 "opc-request-id": kwargs.get("opc_request_id", missing) 8250 } 8251 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8252 8253 retry_strategy = self.base_client.get_preferred_retry_strategy( 8254 operation_retry_strategy=kwargs.get('retry_strategy'), 8255 client_retry_strategy=self.retry_strategy 8256 ) 8257 if retry_strategy is None: 8258 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 8259 8260 if retry_strategy: 8261 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8262 self.base_client.add_opc_client_retries_header(header_params) 8263 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8264 return retry_strategy.make_retrying_call( 8265 self.base_client.call_api, 8266 resource_path=resource_path, 8267 method=method, 8268 path_params=path_params, 8269 query_params=query_params, 8270 header_params=header_params, 8271 response_type="AttributeTagCollection") 8272 else: 8273 return self.base_client.call_api( 8274 resource_path=resource_path, 8275 method=method, 8276 path_params=path_params, 8277 query_params=query_params, 8278 header_params=header_params, 8279 response_type="AttributeTagCollection") 8280 8281 def list_attributes(self, catalog_id, data_asset_key, entity_key, **kwargs): 8282 """ 8283 Returns a list of all attributes of an data entity. 8284 8285 8286 :param str catalog_id: (required) 8287 Unique catalog identifier. 8288 8289 :param str data_asset_key: (required) 8290 Unique data asset key. 8291 8292 :param str entity_key: (required) 8293 Unique entity key. 8294 8295 :param str display_name: (optional) 8296 A filter to return only resources that match the entire display name given. The match is not case sensitive. 8297 8298 :param str business_name: (optional) 8299 A filter to return only resources that match the entire business name given. The match is not case sensitive. 8300 8301 :param str display_or_business_name_contains: (optional) 8302 A filter to return only resources that match display name or business name pattern given. The match is not case sensitive. 8303 For Example : /folders?displayOrBusinessNameContains=Cu.* 8304 The above would match all folders with display name or business name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 8305 8306 :param str display_name_contains: (optional) 8307 A filter to return only resources that match display name pattern given. The match is not case sensitive. 8308 For Example : /folders?displayNameContains=Cu.* 8309 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 8310 8311 :param str lifecycle_state: (optional) 8312 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 8313 8314 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 8315 8316 :param datetime time_created: (optional) 8317 Time that the resource was created. An `RFC3339`__ formatted datetime string. 8318 8319 __ https://tools.ietf.org/html/rfc3339 8320 8321 :param datetime time_updated: (optional) 8322 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 8323 8324 __ https://tools.ietf.org/html/rfc3339 8325 8326 :param str created_by_id: (optional) 8327 OCID of the user who created the resource. 8328 8329 :param str updated_by_id: (optional) 8330 OCID of the user who updated the resource. 8331 8332 :param str external_key: (optional) 8333 Unique external identifier of this resource in the external source system. 8334 8335 :param datetime time_external: (optional) 8336 Last modified timestamp of this object in the external system. 8337 8338 :param str external_type_name: (optional) 8339 Data type as defined in an external system. 8340 8341 :param bool is_incremental_data: (optional) 8342 Identifies whether this attribute can be used as a watermark to extract incremental data. 8343 8344 :param bool is_nullable: (optional) 8345 Identifies whether this attribute can be assigned null value. 8346 8347 :param int length: (optional) 8348 Max allowed length of the attribute value. 8349 8350 :param int position: (optional) 8351 Position of the attribute in the record definition. 8352 8353 :param int precision: (optional) 8354 Precision of the attribute value usually applies to float data type. 8355 8356 :param int scale: (optional) 8357 Scale of the attribute value usually applies to float data type. 8358 8359 :param list[str] fields: (optional) 8360 Specifies the fields to return in an entity attribute summary response. 8361 8362 Allowed values are: "key", "displayName", "description", "entityKey", "lifecycleState", "timeCreated", "externalDataType", "externalKey", "length", "precision", "scale", "isNullable", "uri", "path", "minCollectionCount", "maxCollectionCount", "datatypeEntityKey", "externalDatatypeEntityKey", "parentAttributeKey", "externalParentAttributeKey", "position", "typeKey" 8363 8364 :param str sort_by: (optional) 8365 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. Default order for POSITION is ascending. If no value is specified POSITION is default. 8366 8367 Allowed values are: "TIMECREATED", "DISPLAYNAME", "POSITION" 8368 8369 :param str sort_order: (optional) 8370 The sort order to use, either 'asc' or 'desc'. 8371 8372 Allowed values are: "ASC", "DESC" 8373 8374 :param int limit: (optional) 8375 The maximum number of items to return. 8376 8377 :param str page: (optional) 8378 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 8379 8380 :param str opc_request_id: (optional) 8381 The client request ID for tracing. 8382 8383 :param obj retry_strategy: (optional) 8384 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8385 8386 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 8387 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8388 8389 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8390 8391 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.AttributeCollection` 8392 :rtype: :class:`~oci.response.Response` 8393 8394 :example: 8395 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_attributes.py.html>`__ to see an example of how to use list_attributes API. 8396 """ 8397 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/attributes" 8398 method = "GET" 8399 8400 # Don't accept unknown kwargs 8401 expected_kwargs = [ 8402 "retry_strategy", 8403 "display_name", 8404 "business_name", 8405 "display_or_business_name_contains", 8406 "display_name_contains", 8407 "lifecycle_state", 8408 "time_created", 8409 "time_updated", 8410 "created_by_id", 8411 "updated_by_id", 8412 "external_key", 8413 "time_external", 8414 "external_type_name", 8415 "is_incremental_data", 8416 "is_nullable", 8417 "length", 8418 "position", 8419 "precision", 8420 "scale", 8421 "fields", 8422 "sort_by", 8423 "sort_order", 8424 "limit", 8425 "page", 8426 "opc_request_id" 8427 ] 8428 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8429 if extra_kwargs: 8430 raise ValueError( 8431 "list_attributes got unknown kwargs: {!r}".format(extra_kwargs)) 8432 8433 path_params = { 8434 "catalogId": catalog_id, 8435 "dataAssetKey": data_asset_key, 8436 "entityKey": entity_key 8437 } 8438 8439 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8440 8441 for (k, v) in six.iteritems(path_params): 8442 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8443 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8444 8445 if 'lifecycle_state' in kwargs: 8446 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 8447 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 8448 raise ValueError( 8449 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 8450 ) 8451 8452 if 'fields' in kwargs: 8453 fields_allowed_values = ["key", "displayName", "description", "entityKey", "lifecycleState", "timeCreated", "externalDataType", "externalKey", "length", "precision", "scale", "isNullable", "uri", "path", "minCollectionCount", "maxCollectionCount", "datatypeEntityKey", "externalDatatypeEntityKey", "parentAttributeKey", "externalParentAttributeKey", "position", "typeKey"] 8454 for fields_item in kwargs['fields']: 8455 if fields_item not in fields_allowed_values: 8456 raise ValueError( 8457 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 8458 ) 8459 8460 if 'sort_by' in kwargs: 8461 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME", "POSITION"] 8462 if kwargs['sort_by'] not in sort_by_allowed_values: 8463 raise ValueError( 8464 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 8465 ) 8466 8467 if 'sort_order' in kwargs: 8468 sort_order_allowed_values = ["ASC", "DESC"] 8469 if kwargs['sort_order'] not in sort_order_allowed_values: 8470 raise ValueError( 8471 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 8472 ) 8473 8474 query_params = { 8475 "displayName": kwargs.get("display_name", missing), 8476 "businessName": kwargs.get("business_name", missing), 8477 "displayOrBusinessNameContains": kwargs.get("display_or_business_name_contains", missing), 8478 "displayNameContains": kwargs.get("display_name_contains", missing), 8479 "lifecycleState": kwargs.get("lifecycle_state", missing), 8480 "timeCreated": kwargs.get("time_created", missing), 8481 "timeUpdated": kwargs.get("time_updated", missing), 8482 "createdById": kwargs.get("created_by_id", missing), 8483 "updatedById": kwargs.get("updated_by_id", missing), 8484 "externalKey": kwargs.get("external_key", missing), 8485 "timeExternal": kwargs.get("time_external", missing), 8486 "externalTypeName": kwargs.get("external_type_name", missing), 8487 "isIncrementalData": kwargs.get("is_incremental_data", missing), 8488 "isNullable": kwargs.get("is_nullable", missing), 8489 "length": kwargs.get("length", missing), 8490 "position": kwargs.get("position", missing), 8491 "precision": kwargs.get("precision", missing), 8492 "scale": kwargs.get("scale", missing), 8493 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 8494 "sortBy": kwargs.get("sort_by", missing), 8495 "sortOrder": kwargs.get("sort_order", missing), 8496 "limit": kwargs.get("limit", missing), 8497 "page": kwargs.get("page", missing) 8498 } 8499 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 8500 8501 header_params = { 8502 "accept": "application/json", 8503 "content-type": "application/json", 8504 "opc-request-id": kwargs.get("opc_request_id", missing) 8505 } 8506 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8507 8508 retry_strategy = self.base_client.get_preferred_retry_strategy( 8509 operation_retry_strategy=kwargs.get('retry_strategy'), 8510 client_retry_strategy=self.retry_strategy 8511 ) 8512 if retry_strategy is None: 8513 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 8514 8515 if retry_strategy: 8516 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8517 self.base_client.add_opc_client_retries_header(header_params) 8518 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8519 return retry_strategy.make_retrying_call( 8520 self.base_client.call_api, 8521 resource_path=resource_path, 8522 method=method, 8523 path_params=path_params, 8524 query_params=query_params, 8525 header_params=header_params, 8526 response_type="AttributeCollection") 8527 else: 8528 return self.base_client.call_api( 8529 resource_path=resource_path, 8530 method=method, 8531 path_params=path_params, 8532 query_params=query_params, 8533 header_params=header_params, 8534 response_type="AttributeCollection") 8535 8536 def list_catalog_private_endpoints(self, compartment_id, **kwargs): 8537 """ 8538 Returns a list of all the catalog private endpoints in the specified compartment. 8539 8540 8541 :param str compartment_id: (required) 8542 The OCID of the compartment where you want to list resources. 8543 8544 :param str display_name: (optional) 8545 A filter to return only resources that match the entire display name given. The match is not case sensitive. 8546 8547 :param int limit: (optional) 8548 The maximum number of items to return. 8549 8550 :param str page: (optional) 8551 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 8552 8553 :param str lifecycle_state: (optional) 8554 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 8555 8556 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 8557 8558 :param str sort_order: (optional) 8559 The sort order to use, either 'asc' or 'desc'. 8560 8561 Allowed values are: "ASC", "DESC" 8562 8563 :param str sort_by: (optional) 8564 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 8565 8566 Allowed values are: "TIMECREATED", "DISPLAYNAME" 8567 8568 :param str opc_request_id: (optional) 8569 The client request ID for tracing. 8570 8571 :param obj retry_strategy: (optional) 8572 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8573 8574 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 8575 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8576 8577 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8578 8579 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_catalog.models.CatalogPrivateEndpointSummary` 8580 :rtype: :class:`~oci.response.Response` 8581 8582 :example: 8583 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_catalog_private_endpoints.py.html>`__ to see an example of how to use list_catalog_private_endpoints API. 8584 """ 8585 resource_path = "/catalogPrivateEndpoints" 8586 method = "GET" 8587 8588 # Don't accept unknown kwargs 8589 expected_kwargs = [ 8590 "retry_strategy", 8591 "display_name", 8592 "limit", 8593 "page", 8594 "lifecycle_state", 8595 "sort_order", 8596 "sort_by", 8597 "opc_request_id" 8598 ] 8599 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8600 if extra_kwargs: 8601 raise ValueError( 8602 "list_catalog_private_endpoints got unknown kwargs: {!r}".format(extra_kwargs)) 8603 8604 if 'lifecycle_state' in kwargs: 8605 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 8606 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 8607 raise ValueError( 8608 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 8609 ) 8610 8611 if 'sort_order' in kwargs: 8612 sort_order_allowed_values = ["ASC", "DESC"] 8613 if kwargs['sort_order'] not in sort_order_allowed_values: 8614 raise ValueError( 8615 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 8616 ) 8617 8618 if 'sort_by' in kwargs: 8619 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 8620 if kwargs['sort_by'] not in sort_by_allowed_values: 8621 raise ValueError( 8622 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 8623 ) 8624 8625 query_params = { 8626 "compartmentId": compartment_id, 8627 "displayName": kwargs.get("display_name", missing), 8628 "limit": kwargs.get("limit", missing), 8629 "page": kwargs.get("page", missing), 8630 "lifecycleState": kwargs.get("lifecycle_state", missing), 8631 "sortOrder": kwargs.get("sort_order", missing), 8632 "sortBy": kwargs.get("sort_by", missing) 8633 } 8634 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 8635 8636 header_params = { 8637 "accept": "application/json", 8638 "content-type": "application/json", 8639 "opc-request-id": kwargs.get("opc_request_id", missing) 8640 } 8641 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8642 8643 retry_strategy = self.base_client.get_preferred_retry_strategy( 8644 operation_retry_strategy=kwargs.get('retry_strategy'), 8645 client_retry_strategy=self.retry_strategy 8646 ) 8647 if retry_strategy is None: 8648 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 8649 8650 if retry_strategy: 8651 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8652 self.base_client.add_opc_client_retries_header(header_params) 8653 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8654 return retry_strategy.make_retrying_call( 8655 self.base_client.call_api, 8656 resource_path=resource_path, 8657 method=method, 8658 query_params=query_params, 8659 header_params=header_params, 8660 response_type="list[CatalogPrivateEndpointSummary]") 8661 else: 8662 return self.base_client.call_api( 8663 resource_path=resource_path, 8664 method=method, 8665 query_params=query_params, 8666 header_params=header_params, 8667 response_type="list[CatalogPrivateEndpointSummary]") 8668 8669 def list_catalogs(self, compartment_id, **kwargs): 8670 """ 8671 Returns a list of all the data catalogs in the specified compartment. 8672 8673 8674 :param str compartment_id: (required) 8675 The OCID of the compartment where you want to list resources. 8676 8677 :param str display_name: (optional) 8678 A filter to return only resources that match the entire display name given. The match is not case sensitive. 8679 8680 :param int limit: (optional) 8681 The maximum number of items to return. 8682 8683 :param str page: (optional) 8684 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 8685 8686 :param str lifecycle_state: (optional) 8687 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 8688 8689 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 8690 8691 :param str sort_order: (optional) 8692 The sort order to use, either 'asc' or 'desc'. 8693 8694 Allowed values are: "ASC", "DESC" 8695 8696 :param str sort_by: (optional) 8697 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 8698 8699 Allowed values are: "TIMECREATED", "DISPLAYNAME" 8700 8701 :param str opc_request_id: (optional) 8702 The client request ID for tracing. 8703 8704 :param obj retry_strategy: (optional) 8705 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8706 8707 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 8708 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8709 8710 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8711 8712 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_catalog.models.CatalogSummary` 8713 :rtype: :class:`~oci.response.Response` 8714 8715 :example: 8716 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_catalogs.py.html>`__ to see an example of how to use list_catalogs API. 8717 """ 8718 resource_path = "/catalogs" 8719 method = "GET" 8720 8721 # Don't accept unknown kwargs 8722 expected_kwargs = [ 8723 "retry_strategy", 8724 "display_name", 8725 "limit", 8726 "page", 8727 "lifecycle_state", 8728 "sort_order", 8729 "sort_by", 8730 "opc_request_id" 8731 ] 8732 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8733 if extra_kwargs: 8734 raise ValueError( 8735 "list_catalogs got unknown kwargs: {!r}".format(extra_kwargs)) 8736 8737 if 'lifecycle_state' in kwargs: 8738 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 8739 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 8740 raise ValueError( 8741 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 8742 ) 8743 8744 if 'sort_order' in kwargs: 8745 sort_order_allowed_values = ["ASC", "DESC"] 8746 if kwargs['sort_order'] not in sort_order_allowed_values: 8747 raise ValueError( 8748 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 8749 ) 8750 8751 if 'sort_by' in kwargs: 8752 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 8753 if kwargs['sort_by'] not in sort_by_allowed_values: 8754 raise ValueError( 8755 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 8756 ) 8757 8758 query_params = { 8759 "compartmentId": compartment_id, 8760 "displayName": kwargs.get("display_name", missing), 8761 "limit": kwargs.get("limit", missing), 8762 "page": kwargs.get("page", missing), 8763 "lifecycleState": kwargs.get("lifecycle_state", missing), 8764 "sortOrder": kwargs.get("sort_order", missing), 8765 "sortBy": kwargs.get("sort_by", missing) 8766 } 8767 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 8768 8769 header_params = { 8770 "accept": "application/json", 8771 "content-type": "application/json", 8772 "opc-request-id": kwargs.get("opc_request_id", missing) 8773 } 8774 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8775 8776 retry_strategy = self.base_client.get_preferred_retry_strategy( 8777 operation_retry_strategy=kwargs.get('retry_strategy'), 8778 client_retry_strategy=self.retry_strategy 8779 ) 8780 if retry_strategy is None: 8781 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 8782 8783 if retry_strategy: 8784 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8785 self.base_client.add_opc_client_retries_header(header_params) 8786 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8787 return retry_strategy.make_retrying_call( 8788 self.base_client.call_api, 8789 resource_path=resource_path, 8790 method=method, 8791 query_params=query_params, 8792 header_params=header_params, 8793 response_type="list[CatalogSummary]") 8794 else: 8795 return self.base_client.call_api( 8796 resource_path=resource_path, 8797 method=method, 8798 query_params=query_params, 8799 header_params=header_params, 8800 response_type="list[CatalogSummary]") 8801 8802 def list_connections(self, catalog_id, data_asset_key, **kwargs): 8803 """ 8804 Returns a list of all Connections for a data asset. 8805 8806 8807 :param str catalog_id: (required) 8808 Unique catalog identifier. 8809 8810 :param str data_asset_key: (required) 8811 Unique data asset key. 8812 8813 :param str display_name: (optional) 8814 A filter to return only resources that match the entire display name given. The match is not case sensitive. 8815 8816 :param str display_name_contains: (optional) 8817 A filter to return only resources that match display name pattern given. The match is not case sensitive. 8818 For Example : /folders?displayNameContains=Cu.* 8819 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 8820 8821 :param str lifecycle_state: (optional) 8822 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 8823 8824 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 8825 8826 :param datetime time_created: (optional) 8827 Time that the resource was created. An `RFC3339`__ formatted datetime string. 8828 8829 __ https://tools.ietf.org/html/rfc3339 8830 8831 :param datetime time_updated: (optional) 8832 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 8833 8834 __ https://tools.ietf.org/html/rfc3339 8835 8836 :param str created_by_id: (optional) 8837 OCID of the user who created the resource. 8838 8839 :param str updated_by_id: (optional) 8840 OCID of the user who updated the resource. 8841 8842 :param str external_key: (optional) 8843 Unique external identifier of this resource in the external source system. 8844 8845 :param datetime time_status_updated: (optional) 8846 Time that the resource's status was last updated. An `RFC3339`__ formatted datetime string. 8847 8848 __ https://tools.ietf.org/html/rfc3339 8849 8850 :param bool is_default: (optional) 8851 Indicates whether this connection is the default connection. 8852 8853 :param list[str] fields: (optional) 8854 Specifies the fields to return in a connection summary response. 8855 8856 Allowed values are: "key", "displayName", "description", "dataAssetKey", "typeKey", "timeCreated", "externalKey", "lifecycleState", "isDefault", "uri" 8857 8858 :param str sort_by: (optional) 8859 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 8860 8861 Allowed values are: "TIMECREATED", "DISPLAYNAME" 8862 8863 :param str sort_order: (optional) 8864 The sort order to use, either 'asc' or 'desc'. 8865 8866 Allowed values are: "ASC", "DESC" 8867 8868 :param int limit: (optional) 8869 The maximum number of items to return. 8870 8871 :param str page: (optional) 8872 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 8873 8874 :param str opc_request_id: (optional) 8875 The client request ID for tracing. 8876 8877 :param obj retry_strategy: (optional) 8878 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 8879 8880 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 8881 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 8882 8883 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 8884 8885 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.ConnectionCollection` 8886 :rtype: :class:`~oci.response.Response` 8887 8888 :example: 8889 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_connections.py.html>`__ to see an example of how to use list_connections API. 8890 """ 8891 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/connections" 8892 method = "GET" 8893 8894 # Don't accept unknown kwargs 8895 expected_kwargs = [ 8896 "retry_strategy", 8897 "display_name", 8898 "display_name_contains", 8899 "lifecycle_state", 8900 "time_created", 8901 "time_updated", 8902 "created_by_id", 8903 "updated_by_id", 8904 "external_key", 8905 "time_status_updated", 8906 "is_default", 8907 "fields", 8908 "sort_by", 8909 "sort_order", 8910 "limit", 8911 "page", 8912 "opc_request_id" 8913 ] 8914 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 8915 if extra_kwargs: 8916 raise ValueError( 8917 "list_connections got unknown kwargs: {!r}".format(extra_kwargs)) 8918 8919 path_params = { 8920 "catalogId": catalog_id, 8921 "dataAssetKey": data_asset_key 8922 } 8923 8924 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 8925 8926 for (k, v) in six.iteritems(path_params): 8927 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 8928 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 8929 8930 if 'lifecycle_state' in kwargs: 8931 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 8932 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 8933 raise ValueError( 8934 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 8935 ) 8936 8937 if 'fields' in kwargs: 8938 fields_allowed_values = ["key", "displayName", "description", "dataAssetKey", "typeKey", "timeCreated", "externalKey", "lifecycleState", "isDefault", "uri"] 8939 for fields_item in kwargs['fields']: 8940 if fields_item not in fields_allowed_values: 8941 raise ValueError( 8942 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 8943 ) 8944 8945 if 'sort_by' in kwargs: 8946 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 8947 if kwargs['sort_by'] not in sort_by_allowed_values: 8948 raise ValueError( 8949 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 8950 ) 8951 8952 if 'sort_order' in kwargs: 8953 sort_order_allowed_values = ["ASC", "DESC"] 8954 if kwargs['sort_order'] not in sort_order_allowed_values: 8955 raise ValueError( 8956 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 8957 ) 8958 8959 query_params = { 8960 "displayName": kwargs.get("display_name", missing), 8961 "displayNameContains": kwargs.get("display_name_contains", missing), 8962 "lifecycleState": kwargs.get("lifecycle_state", missing), 8963 "timeCreated": kwargs.get("time_created", missing), 8964 "timeUpdated": kwargs.get("time_updated", missing), 8965 "createdById": kwargs.get("created_by_id", missing), 8966 "updatedById": kwargs.get("updated_by_id", missing), 8967 "externalKey": kwargs.get("external_key", missing), 8968 "timeStatusUpdated": kwargs.get("time_status_updated", missing), 8969 "isDefault": kwargs.get("is_default", missing), 8970 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 8971 "sortBy": kwargs.get("sort_by", missing), 8972 "sortOrder": kwargs.get("sort_order", missing), 8973 "limit": kwargs.get("limit", missing), 8974 "page": kwargs.get("page", missing) 8975 } 8976 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 8977 8978 header_params = { 8979 "accept": "application/json", 8980 "content-type": "application/json", 8981 "opc-request-id": kwargs.get("opc_request_id", missing) 8982 } 8983 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 8984 8985 retry_strategy = self.base_client.get_preferred_retry_strategy( 8986 operation_retry_strategy=kwargs.get('retry_strategy'), 8987 client_retry_strategy=self.retry_strategy 8988 ) 8989 if retry_strategy is None: 8990 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 8991 8992 if retry_strategy: 8993 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 8994 self.base_client.add_opc_client_retries_header(header_params) 8995 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 8996 return retry_strategy.make_retrying_call( 8997 self.base_client.call_api, 8998 resource_path=resource_path, 8999 method=method, 9000 path_params=path_params, 9001 query_params=query_params, 9002 header_params=header_params, 9003 response_type="ConnectionCollection") 9004 else: 9005 return self.base_client.call_api( 9006 resource_path=resource_path, 9007 method=method, 9008 path_params=path_params, 9009 query_params=query_params, 9010 header_params=header_params, 9011 response_type="ConnectionCollection") 9012 9013 def list_custom_properties(self, catalog_id, namespace_id, **kwargs): 9014 """ 9015 Returns a list of custom properties within a data catalog. 9016 9017 9018 :param str catalog_id: (required) 9019 Unique catalog identifier. 9020 9021 :param str namespace_id: (required) 9022 Unique namespace identifier. 9023 9024 :param str display_name: (optional) 9025 A filter to return only resources that match the entire display name given. The match is not case sensitive. 9026 9027 :param str display_name_contains: (optional) 9028 A filter to return only resources that match display name pattern given. The match is not case sensitive. 9029 For Example : /folders?displayNameContains=Cu.* 9030 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 9031 9032 :param list[str] data_types: (optional) 9033 Return the custom properties which has specified data types 9034 9035 Allowed values are: "TEXT", "RICH_TEXT", "BOOLEAN", "NUMBER", "DATE" 9036 9037 :param list[str] type_name: (optional) 9038 A filter to return only resources that match the entire type name given. The match is not case sensitive 9039 9040 Allowed values are: "DATA_ASSET", "AUTONOMOUS_DATA_WAREHOUSE", "HIVE", "KAFKA", "MYSQL", "ORACLE_OBJECT_STORAGE", "AUTONOMOUS_TRANSACTION_PROCESSING", "ORACLE", "POSTGRESQL", "MICROSOFT_AZURE_SQL_DATABASE", "MICROSOFT_SQL_SERVER", "IBM_DB2", "DATA_ENTITY", "LOGICAL_ENTITY", "TABLE", "VIEW", "ATTRIBUTE", "FOLDER", "ORACLE_ANALYTICS_SUBJECT_AREA_COLUMN", "ORACLE_ANALYTICS_LOGICAL_COLUMN", "ORACLE_ANALYTICS_PHYSICAL_COLUMN", "ORACLE_ANALYTICS_ANALYSIS_COLUMN", "ORACLE_ANALYTICS_SERVER", "ORACLE_ANALYTICS_CLOUD", "ORACLE_ANALYTICS_SUBJECT_AREA", "ORACLE_ANALYTICS_DASHBOARD", "ORACLE_ANALYTICS_BUSINESS_MODEL", "ORACLE_ANALYTICS_PHYSICAL_DATABASE", "ORACLE_ANALYTICS_PHYSICAL_SCHEMA", "ORACLE_ANALYTICS_PRESENTATION_TABLE", "ORACLE_ANALYTICS_LOGICAL_TABLE", "ORACLE_ANALYTICS_PHYSICAL_TABLE", "ORACLE_ANALYTICS_ANALYSIS", "DATABASE_SCHEMA", "TOPIC", "CONNECTION", "GLOSSARY", "TERM", "CATEGORY", "FILE", "BUCKET", "MESSAGE", "UNRECOGNIZED_FILE" 9041 9042 :param str lifecycle_state: (optional) 9043 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 9044 9045 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 9046 9047 :param datetime time_created: (optional) 9048 Time that the resource was created. An `RFC3339`__ formatted datetime string. 9049 9050 __ https://tools.ietf.org/html/rfc3339 9051 9052 :param datetime time_updated: (optional) 9053 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 9054 9055 __ https://tools.ietf.org/html/rfc3339 9056 9057 :param str created_by_id: (optional) 9058 OCID of the user who created the resource. 9059 9060 :param str updated_by_id: (optional) 9061 OCID of the user who updated the resource. 9062 9063 :param list[str] fields: (optional) 9064 Specifies the fields to return in a custom property summary response. 9065 9066 Allowed values are: "key", "displayName", "description", "dataType", "namespaceName", "lifecycleState", "timeCreated" 9067 9068 :param str sort_order: (optional) 9069 The sort order to use, either 'asc' or 'desc'. 9070 9071 Allowed values are: "ASC", "DESC" 9072 9073 :param str sort_by: (optional) 9074 The field to sort by. Only one sort order may be provided. Default order for USAGECOUNT and DISPLAYNAME is Ascending 9075 9076 Allowed values are: "DISPLAYNAME", "USAGECOUNT" 9077 9078 :param int limit: (optional) 9079 The maximum number of items to return. 9080 9081 :param str page: (optional) 9082 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 9083 9084 :param str opc_request_id: (optional) 9085 The client request ID for tracing. 9086 9087 :param obj retry_strategy: (optional) 9088 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9089 9090 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 9091 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9092 9093 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9094 9095 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.CustomPropertyCollection` 9096 :rtype: :class:`~oci.response.Response` 9097 9098 :example: 9099 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_custom_properties.py.html>`__ to see an example of how to use list_custom_properties API. 9100 """ 9101 resource_path = "/catalogs/{catalogId}/namespaces/{namespaceId}/customProperties" 9102 method = "GET" 9103 9104 # Don't accept unknown kwargs 9105 expected_kwargs = [ 9106 "retry_strategy", 9107 "display_name", 9108 "display_name_contains", 9109 "data_types", 9110 "type_name", 9111 "lifecycle_state", 9112 "time_created", 9113 "time_updated", 9114 "created_by_id", 9115 "updated_by_id", 9116 "fields", 9117 "sort_order", 9118 "sort_by", 9119 "limit", 9120 "page", 9121 "opc_request_id" 9122 ] 9123 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9124 if extra_kwargs: 9125 raise ValueError( 9126 "list_custom_properties got unknown kwargs: {!r}".format(extra_kwargs)) 9127 9128 path_params = { 9129 "catalogId": catalog_id, 9130 "namespaceId": namespace_id 9131 } 9132 9133 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9134 9135 for (k, v) in six.iteritems(path_params): 9136 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9137 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9138 9139 if 'data_types' in kwargs: 9140 data_types_allowed_values = ["TEXT", "RICH_TEXT", "BOOLEAN", "NUMBER", "DATE"] 9141 for data_types_item in kwargs['data_types']: 9142 if data_types_item not in data_types_allowed_values: 9143 raise ValueError( 9144 "Invalid value for `data_types`, must be one of {0}".format(data_types_allowed_values) 9145 ) 9146 9147 if 'type_name' in kwargs: 9148 type_name_allowed_values = ["DATA_ASSET", "AUTONOMOUS_DATA_WAREHOUSE", "HIVE", "KAFKA", "MYSQL", "ORACLE_OBJECT_STORAGE", "AUTONOMOUS_TRANSACTION_PROCESSING", "ORACLE", "POSTGRESQL", "MICROSOFT_AZURE_SQL_DATABASE", "MICROSOFT_SQL_SERVER", "IBM_DB2", "DATA_ENTITY", "LOGICAL_ENTITY", "TABLE", "VIEW", "ATTRIBUTE", "FOLDER", "ORACLE_ANALYTICS_SUBJECT_AREA_COLUMN", "ORACLE_ANALYTICS_LOGICAL_COLUMN", "ORACLE_ANALYTICS_PHYSICAL_COLUMN", "ORACLE_ANALYTICS_ANALYSIS_COLUMN", "ORACLE_ANALYTICS_SERVER", "ORACLE_ANALYTICS_CLOUD", "ORACLE_ANALYTICS_SUBJECT_AREA", "ORACLE_ANALYTICS_DASHBOARD", "ORACLE_ANALYTICS_BUSINESS_MODEL", "ORACLE_ANALYTICS_PHYSICAL_DATABASE", "ORACLE_ANALYTICS_PHYSICAL_SCHEMA", "ORACLE_ANALYTICS_PRESENTATION_TABLE", "ORACLE_ANALYTICS_LOGICAL_TABLE", "ORACLE_ANALYTICS_PHYSICAL_TABLE", "ORACLE_ANALYTICS_ANALYSIS", "DATABASE_SCHEMA", "TOPIC", "CONNECTION", "GLOSSARY", "TERM", "CATEGORY", "FILE", "BUCKET", "MESSAGE", "UNRECOGNIZED_FILE"] 9149 for type_name_item in kwargs['type_name']: 9150 if type_name_item not in type_name_allowed_values: 9151 raise ValueError( 9152 "Invalid value for `type_name`, must be one of {0}".format(type_name_allowed_values) 9153 ) 9154 9155 if 'lifecycle_state' in kwargs: 9156 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 9157 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 9158 raise ValueError( 9159 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 9160 ) 9161 9162 if 'fields' in kwargs: 9163 fields_allowed_values = ["key", "displayName", "description", "dataType", "namespaceName", "lifecycleState", "timeCreated"] 9164 for fields_item in kwargs['fields']: 9165 if fields_item not in fields_allowed_values: 9166 raise ValueError( 9167 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 9168 ) 9169 9170 if 'sort_order' in kwargs: 9171 sort_order_allowed_values = ["ASC", "DESC"] 9172 if kwargs['sort_order'] not in sort_order_allowed_values: 9173 raise ValueError( 9174 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 9175 ) 9176 9177 if 'sort_by' in kwargs: 9178 sort_by_allowed_values = ["DISPLAYNAME", "USAGECOUNT"] 9179 if kwargs['sort_by'] not in sort_by_allowed_values: 9180 raise ValueError( 9181 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 9182 ) 9183 9184 query_params = { 9185 "displayName": kwargs.get("display_name", missing), 9186 "displayNameContains": kwargs.get("display_name_contains", missing), 9187 "dataTypes": self.base_client.generate_collection_format_param(kwargs.get("data_types", missing), 'multi'), 9188 "typeName": self.base_client.generate_collection_format_param(kwargs.get("type_name", missing), 'multi'), 9189 "lifecycleState": kwargs.get("lifecycle_state", missing), 9190 "timeCreated": kwargs.get("time_created", missing), 9191 "timeUpdated": kwargs.get("time_updated", missing), 9192 "createdById": kwargs.get("created_by_id", missing), 9193 "updatedById": kwargs.get("updated_by_id", missing), 9194 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 9195 "sortOrder": kwargs.get("sort_order", missing), 9196 "sortBy": kwargs.get("sort_by", missing), 9197 "limit": kwargs.get("limit", missing), 9198 "page": kwargs.get("page", missing) 9199 } 9200 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 9201 9202 header_params = { 9203 "accept": "application/json", 9204 "content-type": "application/json", 9205 "opc-request-id": kwargs.get("opc_request_id", missing) 9206 } 9207 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 9208 9209 retry_strategy = self.base_client.get_preferred_retry_strategy( 9210 operation_retry_strategy=kwargs.get('retry_strategy'), 9211 client_retry_strategy=self.retry_strategy 9212 ) 9213 if retry_strategy is None: 9214 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 9215 9216 if retry_strategy: 9217 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9218 self.base_client.add_opc_client_retries_header(header_params) 9219 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9220 return retry_strategy.make_retrying_call( 9221 self.base_client.call_api, 9222 resource_path=resource_path, 9223 method=method, 9224 path_params=path_params, 9225 query_params=query_params, 9226 header_params=header_params, 9227 response_type="CustomPropertyCollection") 9228 else: 9229 return self.base_client.call_api( 9230 resource_path=resource_path, 9231 method=method, 9232 path_params=path_params, 9233 query_params=query_params, 9234 header_params=header_params, 9235 response_type="CustomPropertyCollection") 9236 9237 def list_data_asset_tags(self, catalog_id, data_asset_key, **kwargs): 9238 """ 9239 Returns a list of all tags for a data asset. 9240 9241 9242 :param str catalog_id: (required) 9243 Unique catalog identifier. 9244 9245 :param str data_asset_key: (required) 9246 Unique data asset key. 9247 9248 :param str name: (optional) 9249 Immutable resource name. 9250 9251 :param str lifecycle_state: (optional) 9252 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 9253 9254 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 9255 9256 :param str term_key: (optional) 9257 Unique key of the related term. 9258 9259 :param str term_path: (optional) 9260 Path of the related term. 9261 9262 :param datetime time_created: (optional) 9263 Time that the resource was created. An `RFC3339`__ formatted datetime string. 9264 9265 __ https://tools.ietf.org/html/rfc3339 9266 9267 :param str created_by_id: (optional) 9268 OCID of the user who created the resource. 9269 9270 :param list[str] fields: (optional) 9271 Specifies the fields to return in a data asset tag summary response. 9272 9273 Allowed values are: "key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "uri", "glossaryKey", "dataAssetKey" 9274 9275 :param str sort_by: (optional) 9276 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 9277 9278 Allowed values are: "TIMECREATED", "DISPLAYNAME" 9279 9280 :param str sort_order: (optional) 9281 The sort order to use, either 'asc' or 'desc'. 9282 9283 Allowed values are: "ASC", "DESC" 9284 9285 :param int limit: (optional) 9286 The maximum number of items to return. 9287 9288 :param str page: (optional) 9289 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 9290 9291 :param str opc_request_id: (optional) 9292 The client request ID for tracing. 9293 9294 :param obj retry_strategy: (optional) 9295 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9296 9297 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 9298 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9299 9300 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9301 9302 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.DataAssetTagCollection` 9303 :rtype: :class:`~oci.response.Response` 9304 9305 :example: 9306 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_data_asset_tags.py.html>`__ to see an example of how to use list_data_asset_tags API. 9307 """ 9308 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/tags" 9309 method = "GET" 9310 9311 # Don't accept unknown kwargs 9312 expected_kwargs = [ 9313 "retry_strategy", 9314 "name", 9315 "lifecycle_state", 9316 "term_key", 9317 "term_path", 9318 "time_created", 9319 "created_by_id", 9320 "fields", 9321 "sort_by", 9322 "sort_order", 9323 "limit", 9324 "page", 9325 "opc_request_id" 9326 ] 9327 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9328 if extra_kwargs: 9329 raise ValueError( 9330 "list_data_asset_tags got unknown kwargs: {!r}".format(extra_kwargs)) 9331 9332 path_params = { 9333 "catalogId": catalog_id, 9334 "dataAssetKey": data_asset_key 9335 } 9336 9337 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9338 9339 for (k, v) in six.iteritems(path_params): 9340 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9341 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9342 9343 if 'lifecycle_state' in kwargs: 9344 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 9345 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 9346 raise ValueError( 9347 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 9348 ) 9349 9350 if 'fields' in kwargs: 9351 fields_allowed_values = ["key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "uri", "glossaryKey", "dataAssetKey"] 9352 for fields_item in kwargs['fields']: 9353 if fields_item not in fields_allowed_values: 9354 raise ValueError( 9355 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 9356 ) 9357 9358 if 'sort_by' in kwargs: 9359 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 9360 if kwargs['sort_by'] not in sort_by_allowed_values: 9361 raise ValueError( 9362 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 9363 ) 9364 9365 if 'sort_order' in kwargs: 9366 sort_order_allowed_values = ["ASC", "DESC"] 9367 if kwargs['sort_order'] not in sort_order_allowed_values: 9368 raise ValueError( 9369 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 9370 ) 9371 9372 query_params = { 9373 "name": kwargs.get("name", missing), 9374 "lifecycleState": kwargs.get("lifecycle_state", missing), 9375 "termKey": kwargs.get("term_key", missing), 9376 "termPath": kwargs.get("term_path", missing), 9377 "timeCreated": kwargs.get("time_created", missing), 9378 "createdById": kwargs.get("created_by_id", missing), 9379 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 9380 "sortBy": kwargs.get("sort_by", missing), 9381 "sortOrder": kwargs.get("sort_order", missing), 9382 "limit": kwargs.get("limit", missing), 9383 "page": kwargs.get("page", missing) 9384 } 9385 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 9386 9387 header_params = { 9388 "accept": "application/json", 9389 "content-type": "application/json", 9390 "opc-request-id": kwargs.get("opc_request_id", missing) 9391 } 9392 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 9393 9394 retry_strategy = self.base_client.get_preferred_retry_strategy( 9395 operation_retry_strategy=kwargs.get('retry_strategy'), 9396 client_retry_strategy=self.retry_strategy 9397 ) 9398 if retry_strategy is None: 9399 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 9400 9401 if retry_strategy: 9402 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9403 self.base_client.add_opc_client_retries_header(header_params) 9404 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9405 return retry_strategy.make_retrying_call( 9406 self.base_client.call_api, 9407 resource_path=resource_path, 9408 method=method, 9409 path_params=path_params, 9410 query_params=query_params, 9411 header_params=header_params, 9412 response_type="DataAssetTagCollection") 9413 else: 9414 return self.base_client.call_api( 9415 resource_path=resource_path, 9416 method=method, 9417 path_params=path_params, 9418 query_params=query_params, 9419 header_params=header_params, 9420 response_type="DataAssetTagCollection") 9421 9422 def list_data_assets(self, catalog_id, **kwargs): 9423 """ 9424 Returns a list of data assets within a data catalog. 9425 9426 9427 :param str catalog_id: (required) 9428 Unique catalog identifier. 9429 9430 :param str display_name: (optional) 9431 A filter to return only resources that match the entire display name given. The match is not case sensitive. 9432 9433 :param str display_name_contains: (optional) 9434 A filter to return only resources that match display name pattern given. The match is not case sensitive. 9435 For Example : /folders?displayNameContains=Cu.* 9436 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 9437 9438 :param str lifecycle_state: (optional) 9439 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 9440 9441 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 9442 9443 :param datetime time_created: (optional) 9444 Time that the resource was created. An `RFC3339`__ formatted datetime string. 9445 9446 __ https://tools.ietf.org/html/rfc3339 9447 9448 :param datetime time_updated: (optional) 9449 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 9450 9451 __ https://tools.ietf.org/html/rfc3339 9452 9453 :param str created_by_id: (optional) 9454 OCID of the user who created the resource. 9455 9456 :param str updated_by_id: (optional) 9457 OCID of the user who updated the resource. 9458 9459 :param str external_key: (optional) 9460 Unique external identifier of this resource in the external source system. 9461 9462 :param str type_key: (optional) 9463 The key of the object type. 9464 9465 :param list[str] fields: (optional) 9466 Specifies the fields to return in a data asset summary response. 9467 9468 Allowed values are: "key", "displayName", "description", "catalogId", "externalKey", "typeKey", "lifecycleState", "timeCreated", "uri" 9469 9470 :param str sort_by: (optional) 9471 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 9472 9473 Allowed values are: "TIMECREATED", "DISPLAYNAME" 9474 9475 :param str sort_order: (optional) 9476 The sort order to use, either 'asc' or 'desc'. 9477 9478 Allowed values are: "ASC", "DESC" 9479 9480 :param int limit: (optional) 9481 The maximum number of items to return. 9482 9483 :param str page: (optional) 9484 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 9485 9486 :param str opc_request_id: (optional) 9487 The client request ID for tracing. 9488 9489 :param obj retry_strategy: (optional) 9490 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9491 9492 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 9493 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9494 9495 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9496 9497 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.DataAssetCollection` 9498 :rtype: :class:`~oci.response.Response` 9499 9500 :example: 9501 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_data_assets.py.html>`__ to see an example of how to use list_data_assets API. 9502 """ 9503 resource_path = "/catalogs/{catalogId}/dataAssets" 9504 method = "GET" 9505 9506 # Don't accept unknown kwargs 9507 expected_kwargs = [ 9508 "retry_strategy", 9509 "display_name", 9510 "display_name_contains", 9511 "lifecycle_state", 9512 "time_created", 9513 "time_updated", 9514 "created_by_id", 9515 "updated_by_id", 9516 "external_key", 9517 "type_key", 9518 "fields", 9519 "sort_by", 9520 "sort_order", 9521 "limit", 9522 "page", 9523 "opc_request_id" 9524 ] 9525 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9526 if extra_kwargs: 9527 raise ValueError( 9528 "list_data_assets got unknown kwargs: {!r}".format(extra_kwargs)) 9529 9530 path_params = { 9531 "catalogId": catalog_id 9532 } 9533 9534 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9535 9536 for (k, v) in six.iteritems(path_params): 9537 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9538 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9539 9540 if 'lifecycle_state' in kwargs: 9541 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 9542 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 9543 raise ValueError( 9544 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 9545 ) 9546 9547 if 'fields' in kwargs: 9548 fields_allowed_values = ["key", "displayName", "description", "catalogId", "externalKey", "typeKey", "lifecycleState", "timeCreated", "uri"] 9549 for fields_item in kwargs['fields']: 9550 if fields_item not in fields_allowed_values: 9551 raise ValueError( 9552 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 9553 ) 9554 9555 if 'sort_by' in kwargs: 9556 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 9557 if kwargs['sort_by'] not in sort_by_allowed_values: 9558 raise ValueError( 9559 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 9560 ) 9561 9562 if 'sort_order' in kwargs: 9563 sort_order_allowed_values = ["ASC", "DESC"] 9564 if kwargs['sort_order'] not in sort_order_allowed_values: 9565 raise ValueError( 9566 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 9567 ) 9568 9569 query_params = { 9570 "displayName": kwargs.get("display_name", missing), 9571 "displayNameContains": kwargs.get("display_name_contains", missing), 9572 "lifecycleState": kwargs.get("lifecycle_state", missing), 9573 "timeCreated": kwargs.get("time_created", missing), 9574 "timeUpdated": kwargs.get("time_updated", missing), 9575 "createdById": kwargs.get("created_by_id", missing), 9576 "updatedById": kwargs.get("updated_by_id", missing), 9577 "externalKey": kwargs.get("external_key", missing), 9578 "typeKey": kwargs.get("type_key", missing), 9579 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 9580 "sortBy": kwargs.get("sort_by", missing), 9581 "sortOrder": kwargs.get("sort_order", missing), 9582 "limit": kwargs.get("limit", missing), 9583 "page": kwargs.get("page", missing) 9584 } 9585 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 9586 9587 header_params = { 9588 "accept": "application/json", 9589 "content-type": "application/json", 9590 "opc-request-id": kwargs.get("opc_request_id", missing) 9591 } 9592 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 9593 9594 retry_strategy = self.base_client.get_preferred_retry_strategy( 9595 operation_retry_strategy=kwargs.get('retry_strategy'), 9596 client_retry_strategy=self.retry_strategy 9597 ) 9598 if retry_strategy is None: 9599 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 9600 9601 if retry_strategy: 9602 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9603 self.base_client.add_opc_client_retries_header(header_params) 9604 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9605 return retry_strategy.make_retrying_call( 9606 self.base_client.call_api, 9607 resource_path=resource_path, 9608 method=method, 9609 path_params=path_params, 9610 query_params=query_params, 9611 header_params=header_params, 9612 response_type="DataAssetCollection") 9613 else: 9614 return self.base_client.call_api( 9615 resource_path=resource_path, 9616 method=method, 9617 path_params=path_params, 9618 query_params=query_params, 9619 header_params=header_params, 9620 response_type="DataAssetCollection") 9621 9622 def list_derived_logical_entities(self, catalog_id, pattern_key, **kwargs): 9623 """ 9624 List logical entities derived from this pattern. 9625 9626 9627 :param str catalog_id: (required) 9628 Unique catalog identifier. 9629 9630 :param str pattern_key: (required) 9631 Unique pattern key. 9632 9633 :param str display_name_contains: (optional) 9634 A filter to return only resources that match display name pattern given. The match is not case sensitive. 9635 For Example : /folders?displayNameContains=Cu.* 9636 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 9637 9638 :param str sort_by: (optional) 9639 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 9640 9641 Allowed values are: "TIMECREATED", "DISPLAYNAME" 9642 9643 :param str sort_order: (optional) 9644 The sort order to use, either 'asc' or 'desc'. 9645 9646 Allowed values are: "ASC", "DESC" 9647 9648 :param int limit: (optional) 9649 The maximum number of items to return. 9650 9651 :param str page: (optional) 9652 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 9653 9654 :param str opc_request_id: (optional) 9655 The client request ID for tracing. 9656 9657 :param str if_match: (optional) 9658 For optimistic concurrency control. In the PUT or DELETE call 9659 for a resource, set the `if-match` parameter to the value of the 9660 etag from a previous GET or POST response for that resource. 9661 The resource will be updated or deleted only if the etag you 9662 provide matches the resource's current etag value. 9663 9664 :param str opc_retry_token: (optional) 9665 A token that uniquely identifies a request so it can be retried in case of a timeout or 9666 server error without risk of executing that same action again. Retry tokens expire after 24 9667 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 9668 has been deleted and purged from the system, then a retry of the original creation request 9669 might be rejected. 9670 9671 :param obj retry_strategy: (optional) 9672 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9673 9674 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 9675 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9676 9677 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9678 9679 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.EntityCollection` 9680 :rtype: :class:`~oci.response.Response` 9681 9682 :example: 9683 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_derived_logical_entities.py.html>`__ to see an example of how to use list_derived_logical_entities API. 9684 """ 9685 resource_path = "/catalogs/{catalogId}/patterns/{patternKey}/actions/listDerivedLogicalEntities" 9686 method = "POST" 9687 9688 # Don't accept unknown kwargs 9689 expected_kwargs = [ 9690 "retry_strategy", 9691 "display_name_contains", 9692 "sort_by", 9693 "sort_order", 9694 "limit", 9695 "page", 9696 "opc_request_id", 9697 "if_match", 9698 "opc_retry_token" 9699 ] 9700 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9701 if extra_kwargs: 9702 raise ValueError( 9703 "list_derived_logical_entities got unknown kwargs: {!r}".format(extra_kwargs)) 9704 9705 path_params = { 9706 "catalogId": catalog_id, 9707 "patternKey": pattern_key 9708 } 9709 9710 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9711 9712 for (k, v) in six.iteritems(path_params): 9713 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9714 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9715 9716 if 'sort_by' in kwargs: 9717 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 9718 if kwargs['sort_by'] not in sort_by_allowed_values: 9719 raise ValueError( 9720 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 9721 ) 9722 9723 if 'sort_order' in kwargs: 9724 sort_order_allowed_values = ["ASC", "DESC"] 9725 if kwargs['sort_order'] not in sort_order_allowed_values: 9726 raise ValueError( 9727 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 9728 ) 9729 9730 query_params = { 9731 "displayNameContains": kwargs.get("display_name_contains", missing), 9732 "sortBy": kwargs.get("sort_by", missing), 9733 "sortOrder": kwargs.get("sort_order", missing), 9734 "limit": kwargs.get("limit", missing), 9735 "page": kwargs.get("page", missing) 9736 } 9737 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 9738 9739 header_params = { 9740 "accept": "application/json", 9741 "content-type": "application/json", 9742 "opc-request-id": kwargs.get("opc_request_id", missing), 9743 "if-match": kwargs.get("if_match", missing), 9744 "opc-retry-token": kwargs.get("opc_retry_token", missing) 9745 } 9746 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 9747 9748 retry_strategy = self.base_client.get_preferred_retry_strategy( 9749 operation_retry_strategy=kwargs.get('retry_strategy'), 9750 client_retry_strategy=self.retry_strategy 9751 ) 9752 if retry_strategy is None: 9753 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 9754 9755 if retry_strategy: 9756 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 9757 self.base_client.add_opc_retry_token_if_needed(header_params) 9758 self.base_client.add_opc_client_retries_header(header_params) 9759 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 9760 return retry_strategy.make_retrying_call( 9761 self.base_client.call_api, 9762 resource_path=resource_path, 9763 method=method, 9764 path_params=path_params, 9765 query_params=query_params, 9766 header_params=header_params, 9767 response_type="EntityCollection") 9768 else: 9769 return self.base_client.call_api( 9770 resource_path=resource_path, 9771 method=method, 9772 path_params=path_params, 9773 query_params=query_params, 9774 header_params=header_params, 9775 response_type="EntityCollection") 9776 9777 def list_entities(self, catalog_id, data_asset_key, **kwargs): 9778 """ 9779 Returns a list of all entities of a data asset. 9780 9781 9782 :param str catalog_id: (required) 9783 Unique catalog identifier. 9784 9785 :param str data_asset_key: (required) 9786 Unique data asset key. 9787 9788 :param str display_name: (optional) 9789 A filter to return only resources that match the entire display name given. The match is not case sensitive. 9790 9791 :param str business_name: (optional) 9792 A filter to return only resources that match the entire business name given. The match is not case sensitive. 9793 9794 :param str display_or_business_name_contains: (optional) 9795 A filter to return only resources that match display name or business name pattern given. The match is not case sensitive. 9796 For Example : /folders?displayOrBusinessNameContains=Cu.* 9797 The above would match all folders with display name or business name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 9798 9799 :param str type_key: (optional) 9800 The key of the object type. 9801 9802 :param str display_name_contains: (optional) 9803 A filter to return only resources that match display name pattern given. The match is not case sensitive. 9804 For Example : /folders?displayNameContains=Cu.* 9805 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 9806 9807 :param str lifecycle_state: (optional) 9808 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 9809 9810 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 9811 9812 :param datetime time_created: (optional) 9813 Time that the resource was created. An `RFC3339`__ formatted datetime string. 9814 9815 __ https://tools.ietf.org/html/rfc3339 9816 9817 :param datetime time_updated: (optional) 9818 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 9819 9820 __ https://tools.ietf.org/html/rfc3339 9821 9822 :param str created_by_id: (optional) 9823 OCID of the user who created the resource. 9824 9825 :param str updated_by_id: (optional) 9826 OCID of the user who updated the resource. 9827 9828 :param str external_key: (optional) 9829 Unique external identifier of this resource in the external source system. 9830 9831 :param str pattern_key: (optional) 9832 Unique pattern key. 9833 9834 :param datetime time_external: (optional) 9835 Last modified timestamp of this object in the external system. 9836 9837 :param datetime time_status_updated: (optional) 9838 Time that the resource's status was last updated. An `RFC3339`__ formatted datetime string. 9839 9840 __ https://tools.ietf.org/html/rfc3339 9841 9842 :param bool is_logical: (optional) 9843 Identifies if the object is a physical object (materialized) or virtual/logical object defined on other objects. 9844 9845 :param bool is_partition: (optional) 9846 Identifies if an object is a sub object (partition) of a physical or materialized parent object. 9847 9848 :param str folder_key: (optional) 9849 Key of the associated folder. 9850 9851 :param str path: (optional) 9852 Full path of the resource for resources that support paths. 9853 9854 :param str harvest_status: (optional) 9855 Harvest status of the harvestable resource as updated by the harvest process. 9856 9857 Allowed values are: "COMPLETE", "ERROR", "IN_PROGRESS", "DEFERRED" 9858 9859 :param str last_job_key: (optional) 9860 Key of the last harvest process to update this resource. 9861 9862 :param list[str] fields: (optional) 9863 Specifies the fields to return in an entity summary response. 9864 9865 Allowed values are: "key", "displayName", "description", "dataAssetKey", "timeCreated", "timeUpdated", "updatedById", "lifecycleState", "folderKey", "folderName", "externalKey", "path", "uri" 9866 9867 :param str sort_by: (optional) 9868 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 9869 9870 Allowed values are: "TIMECREATED", "DISPLAYNAME" 9871 9872 :param str sort_order: (optional) 9873 The sort order to use, either 'asc' or 'desc'. 9874 9875 Allowed values are: "ASC", "DESC" 9876 9877 :param int limit: (optional) 9878 The maximum number of items to return. 9879 9880 :param str page: (optional) 9881 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 9882 9883 :param str opc_request_id: (optional) 9884 The client request ID for tracing. 9885 9886 :param obj retry_strategy: (optional) 9887 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 9888 9889 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 9890 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 9891 9892 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 9893 9894 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.EntityCollection` 9895 :rtype: :class:`~oci.response.Response` 9896 9897 :example: 9898 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_entities.py.html>`__ to see an example of how to use list_entities API. 9899 """ 9900 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities" 9901 method = "GET" 9902 9903 # Don't accept unknown kwargs 9904 expected_kwargs = [ 9905 "retry_strategy", 9906 "display_name", 9907 "business_name", 9908 "display_or_business_name_contains", 9909 "type_key", 9910 "display_name_contains", 9911 "lifecycle_state", 9912 "time_created", 9913 "time_updated", 9914 "created_by_id", 9915 "updated_by_id", 9916 "external_key", 9917 "pattern_key", 9918 "time_external", 9919 "time_status_updated", 9920 "is_logical", 9921 "is_partition", 9922 "folder_key", 9923 "path", 9924 "harvest_status", 9925 "last_job_key", 9926 "fields", 9927 "sort_by", 9928 "sort_order", 9929 "limit", 9930 "page", 9931 "opc_request_id" 9932 ] 9933 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 9934 if extra_kwargs: 9935 raise ValueError( 9936 "list_entities got unknown kwargs: {!r}".format(extra_kwargs)) 9937 9938 path_params = { 9939 "catalogId": catalog_id, 9940 "dataAssetKey": data_asset_key 9941 } 9942 9943 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 9944 9945 for (k, v) in six.iteritems(path_params): 9946 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 9947 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 9948 9949 if 'lifecycle_state' in kwargs: 9950 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 9951 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 9952 raise ValueError( 9953 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 9954 ) 9955 9956 if 'harvest_status' in kwargs: 9957 harvest_status_allowed_values = ["COMPLETE", "ERROR", "IN_PROGRESS", "DEFERRED"] 9958 if kwargs['harvest_status'] not in harvest_status_allowed_values: 9959 raise ValueError( 9960 "Invalid value for `harvest_status`, must be one of {0}".format(harvest_status_allowed_values) 9961 ) 9962 9963 if 'fields' in kwargs: 9964 fields_allowed_values = ["key", "displayName", "description", "dataAssetKey", "timeCreated", "timeUpdated", "updatedById", "lifecycleState", "folderKey", "folderName", "externalKey", "path", "uri"] 9965 for fields_item in kwargs['fields']: 9966 if fields_item not in fields_allowed_values: 9967 raise ValueError( 9968 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 9969 ) 9970 9971 if 'sort_by' in kwargs: 9972 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 9973 if kwargs['sort_by'] not in sort_by_allowed_values: 9974 raise ValueError( 9975 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 9976 ) 9977 9978 if 'sort_order' in kwargs: 9979 sort_order_allowed_values = ["ASC", "DESC"] 9980 if kwargs['sort_order'] not in sort_order_allowed_values: 9981 raise ValueError( 9982 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 9983 ) 9984 9985 query_params = { 9986 "displayName": kwargs.get("display_name", missing), 9987 "businessName": kwargs.get("business_name", missing), 9988 "displayOrBusinessNameContains": kwargs.get("display_or_business_name_contains", missing), 9989 "typeKey": kwargs.get("type_key", missing), 9990 "displayNameContains": kwargs.get("display_name_contains", missing), 9991 "lifecycleState": kwargs.get("lifecycle_state", missing), 9992 "timeCreated": kwargs.get("time_created", missing), 9993 "timeUpdated": kwargs.get("time_updated", missing), 9994 "createdById": kwargs.get("created_by_id", missing), 9995 "updatedById": kwargs.get("updated_by_id", missing), 9996 "externalKey": kwargs.get("external_key", missing), 9997 "patternKey": kwargs.get("pattern_key", missing), 9998 "timeExternal": kwargs.get("time_external", missing), 9999 "timeStatusUpdated": kwargs.get("time_status_updated", missing), 10000 "isLogical": kwargs.get("is_logical", missing), 10001 "isPartition": kwargs.get("is_partition", missing), 10002 "folderKey": kwargs.get("folder_key", missing), 10003 "path": kwargs.get("path", missing), 10004 "harvestStatus": kwargs.get("harvest_status", missing), 10005 "lastJobKey": kwargs.get("last_job_key", missing), 10006 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 10007 "sortBy": kwargs.get("sort_by", missing), 10008 "sortOrder": kwargs.get("sort_order", missing), 10009 "limit": kwargs.get("limit", missing), 10010 "page": kwargs.get("page", missing) 10011 } 10012 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 10013 10014 header_params = { 10015 "accept": "application/json", 10016 "content-type": "application/json", 10017 "opc-request-id": kwargs.get("opc_request_id", missing) 10018 } 10019 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 10020 10021 retry_strategy = self.base_client.get_preferred_retry_strategy( 10022 operation_retry_strategy=kwargs.get('retry_strategy'), 10023 client_retry_strategy=self.retry_strategy 10024 ) 10025 if retry_strategy is None: 10026 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 10027 10028 if retry_strategy: 10029 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10030 self.base_client.add_opc_client_retries_header(header_params) 10031 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10032 return retry_strategy.make_retrying_call( 10033 self.base_client.call_api, 10034 resource_path=resource_path, 10035 method=method, 10036 path_params=path_params, 10037 query_params=query_params, 10038 header_params=header_params, 10039 response_type="EntityCollection") 10040 else: 10041 return self.base_client.call_api( 10042 resource_path=resource_path, 10043 method=method, 10044 path_params=path_params, 10045 query_params=query_params, 10046 header_params=header_params, 10047 response_type="EntityCollection") 10048 10049 def list_entity_tags(self, catalog_id, data_asset_key, entity_key, **kwargs): 10050 """ 10051 Returns a list of all tags for a data entity. 10052 10053 10054 :param str catalog_id: (required) 10055 Unique catalog identifier. 10056 10057 :param str data_asset_key: (required) 10058 Unique data asset key. 10059 10060 :param str entity_key: (required) 10061 Unique entity key. 10062 10063 :param str name: (optional) 10064 Immutable resource name. 10065 10066 :param str lifecycle_state: (optional) 10067 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 10068 10069 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 10070 10071 :param str term_key: (optional) 10072 Unique key of the related term. 10073 10074 :param str term_path: (optional) 10075 Path of the related term. 10076 10077 :param datetime time_created: (optional) 10078 Time that the resource was created. An `RFC3339`__ formatted datetime string. 10079 10080 __ https://tools.ietf.org/html/rfc3339 10081 10082 :param str created_by_id: (optional) 10083 OCID of the user who created the resource. 10084 10085 :param list[str] fields: (optional) 10086 Specifies the fields to return in an entity tag summary response. 10087 10088 Allowed values are: "key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "uri", "glossaryKey", "entityKey" 10089 10090 :param str sort_by: (optional) 10091 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 10092 10093 Allowed values are: "TIMECREATED", "DISPLAYNAME" 10094 10095 :param str sort_order: (optional) 10096 The sort order to use, either 'asc' or 'desc'. 10097 10098 Allowed values are: "ASC", "DESC" 10099 10100 :param int limit: (optional) 10101 The maximum number of items to return. 10102 10103 :param str page: (optional) 10104 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 10105 10106 :param str opc_request_id: (optional) 10107 The client request ID for tracing. 10108 10109 :param obj retry_strategy: (optional) 10110 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10111 10112 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 10113 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10114 10115 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10116 10117 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.EntityTagCollection` 10118 :rtype: :class:`~oci.response.Response` 10119 10120 :example: 10121 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_entity_tags.py.html>`__ to see an example of how to use list_entity_tags API. 10122 """ 10123 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/tags" 10124 method = "GET" 10125 10126 # Don't accept unknown kwargs 10127 expected_kwargs = [ 10128 "retry_strategy", 10129 "name", 10130 "lifecycle_state", 10131 "term_key", 10132 "term_path", 10133 "time_created", 10134 "created_by_id", 10135 "fields", 10136 "sort_by", 10137 "sort_order", 10138 "limit", 10139 "page", 10140 "opc_request_id" 10141 ] 10142 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10143 if extra_kwargs: 10144 raise ValueError( 10145 "list_entity_tags got unknown kwargs: {!r}".format(extra_kwargs)) 10146 10147 path_params = { 10148 "catalogId": catalog_id, 10149 "dataAssetKey": data_asset_key, 10150 "entityKey": entity_key 10151 } 10152 10153 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10154 10155 for (k, v) in six.iteritems(path_params): 10156 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10157 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10158 10159 if 'lifecycle_state' in kwargs: 10160 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 10161 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 10162 raise ValueError( 10163 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 10164 ) 10165 10166 if 'fields' in kwargs: 10167 fields_allowed_values = ["key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "uri", "glossaryKey", "entityKey"] 10168 for fields_item in kwargs['fields']: 10169 if fields_item not in fields_allowed_values: 10170 raise ValueError( 10171 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 10172 ) 10173 10174 if 'sort_by' in kwargs: 10175 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 10176 if kwargs['sort_by'] not in sort_by_allowed_values: 10177 raise ValueError( 10178 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 10179 ) 10180 10181 if 'sort_order' in kwargs: 10182 sort_order_allowed_values = ["ASC", "DESC"] 10183 if kwargs['sort_order'] not in sort_order_allowed_values: 10184 raise ValueError( 10185 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 10186 ) 10187 10188 query_params = { 10189 "name": kwargs.get("name", missing), 10190 "lifecycleState": kwargs.get("lifecycle_state", missing), 10191 "termKey": kwargs.get("term_key", missing), 10192 "termPath": kwargs.get("term_path", missing), 10193 "timeCreated": kwargs.get("time_created", missing), 10194 "createdById": kwargs.get("created_by_id", missing), 10195 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 10196 "sortBy": kwargs.get("sort_by", missing), 10197 "sortOrder": kwargs.get("sort_order", missing), 10198 "limit": kwargs.get("limit", missing), 10199 "page": kwargs.get("page", missing) 10200 } 10201 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 10202 10203 header_params = { 10204 "accept": "application/json", 10205 "content-type": "application/json", 10206 "opc-request-id": kwargs.get("opc_request_id", missing) 10207 } 10208 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 10209 10210 retry_strategy = self.base_client.get_preferred_retry_strategy( 10211 operation_retry_strategy=kwargs.get('retry_strategy'), 10212 client_retry_strategy=self.retry_strategy 10213 ) 10214 if retry_strategy is None: 10215 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 10216 10217 if retry_strategy: 10218 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10219 self.base_client.add_opc_client_retries_header(header_params) 10220 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10221 return retry_strategy.make_retrying_call( 10222 self.base_client.call_api, 10223 resource_path=resource_path, 10224 method=method, 10225 path_params=path_params, 10226 query_params=query_params, 10227 header_params=header_params, 10228 response_type="EntityTagCollection") 10229 else: 10230 return self.base_client.call_api( 10231 resource_path=resource_path, 10232 method=method, 10233 path_params=path_params, 10234 query_params=query_params, 10235 header_params=header_params, 10236 response_type="EntityTagCollection") 10237 10238 def list_folder_tags(self, catalog_id, data_asset_key, folder_key, **kwargs): 10239 """ 10240 Returns a list of all tags for a folder. 10241 10242 10243 :param str catalog_id: (required) 10244 Unique catalog identifier. 10245 10246 :param str data_asset_key: (required) 10247 Unique data asset key. 10248 10249 :param str folder_key: (required) 10250 Unique folder key. 10251 10252 :param str name: (optional) 10253 Immutable resource name. 10254 10255 :param str lifecycle_state: (optional) 10256 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 10257 10258 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 10259 10260 :param str term_key: (optional) 10261 Unique key of the related term. 10262 10263 :param str term_path: (optional) 10264 Path of the related term. 10265 10266 :param datetime time_created: (optional) 10267 Time that the resource was created. An `RFC3339`__ formatted datetime string. 10268 10269 __ https://tools.ietf.org/html/rfc3339 10270 10271 :param str created_by_id: (optional) 10272 OCID of the user who created the resource. 10273 10274 :param list[str] fields: (optional) 10275 Specifies the fields to return in a folder tag summary response. 10276 10277 Allowed values are: "key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "uri", "glossaryKey", "folderKey" 10278 10279 :param str sort_by: (optional) 10280 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 10281 10282 Allowed values are: "TIMECREATED", "DISPLAYNAME" 10283 10284 :param str sort_order: (optional) 10285 The sort order to use, either 'asc' or 'desc'. 10286 10287 Allowed values are: "ASC", "DESC" 10288 10289 :param int limit: (optional) 10290 The maximum number of items to return. 10291 10292 :param str page: (optional) 10293 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 10294 10295 :param str opc_request_id: (optional) 10296 The client request ID for tracing. 10297 10298 :param obj retry_strategy: (optional) 10299 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10300 10301 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 10302 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10303 10304 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10305 10306 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.FolderTagCollection` 10307 :rtype: :class:`~oci.response.Response` 10308 10309 :example: 10310 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_folder_tags.py.html>`__ to see an example of how to use list_folder_tags API. 10311 """ 10312 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/folders/{folderKey}/tags" 10313 method = "GET" 10314 10315 # Don't accept unknown kwargs 10316 expected_kwargs = [ 10317 "retry_strategy", 10318 "name", 10319 "lifecycle_state", 10320 "term_key", 10321 "term_path", 10322 "time_created", 10323 "created_by_id", 10324 "fields", 10325 "sort_by", 10326 "sort_order", 10327 "limit", 10328 "page", 10329 "opc_request_id" 10330 ] 10331 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10332 if extra_kwargs: 10333 raise ValueError( 10334 "list_folder_tags got unknown kwargs: {!r}".format(extra_kwargs)) 10335 10336 path_params = { 10337 "catalogId": catalog_id, 10338 "dataAssetKey": data_asset_key, 10339 "folderKey": folder_key 10340 } 10341 10342 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10343 10344 for (k, v) in six.iteritems(path_params): 10345 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10346 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10347 10348 if 'lifecycle_state' in kwargs: 10349 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 10350 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 10351 raise ValueError( 10352 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 10353 ) 10354 10355 if 'fields' in kwargs: 10356 fields_allowed_values = ["key", "name", "termKey", "termPath", "termDescription", "lifecycleState", "timeCreated", "uri", "glossaryKey", "folderKey"] 10357 for fields_item in kwargs['fields']: 10358 if fields_item not in fields_allowed_values: 10359 raise ValueError( 10360 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 10361 ) 10362 10363 if 'sort_by' in kwargs: 10364 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 10365 if kwargs['sort_by'] not in sort_by_allowed_values: 10366 raise ValueError( 10367 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 10368 ) 10369 10370 if 'sort_order' in kwargs: 10371 sort_order_allowed_values = ["ASC", "DESC"] 10372 if kwargs['sort_order'] not in sort_order_allowed_values: 10373 raise ValueError( 10374 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 10375 ) 10376 10377 query_params = { 10378 "name": kwargs.get("name", missing), 10379 "lifecycleState": kwargs.get("lifecycle_state", missing), 10380 "termKey": kwargs.get("term_key", missing), 10381 "termPath": kwargs.get("term_path", missing), 10382 "timeCreated": kwargs.get("time_created", missing), 10383 "createdById": kwargs.get("created_by_id", missing), 10384 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 10385 "sortBy": kwargs.get("sort_by", missing), 10386 "sortOrder": kwargs.get("sort_order", missing), 10387 "limit": kwargs.get("limit", missing), 10388 "page": kwargs.get("page", missing) 10389 } 10390 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 10391 10392 header_params = { 10393 "accept": "application/json", 10394 "content-type": "application/json", 10395 "opc-request-id": kwargs.get("opc_request_id", missing) 10396 } 10397 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 10398 10399 retry_strategy = self.base_client.get_preferred_retry_strategy( 10400 operation_retry_strategy=kwargs.get('retry_strategy'), 10401 client_retry_strategy=self.retry_strategy 10402 ) 10403 if retry_strategy is None: 10404 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 10405 10406 if retry_strategy: 10407 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10408 self.base_client.add_opc_client_retries_header(header_params) 10409 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10410 return retry_strategy.make_retrying_call( 10411 self.base_client.call_api, 10412 resource_path=resource_path, 10413 method=method, 10414 path_params=path_params, 10415 query_params=query_params, 10416 header_params=header_params, 10417 response_type="FolderTagCollection") 10418 else: 10419 return self.base_client.call_api( 10420 resource_path=resource_path, 10421 method=method, 10422 path_params=path_params, 10423 query_params=query_params, 10424 header_params=header_params, 10425 response_type="FolderTagCollection") 10426 10427 def list_folders(self, catalog_id, data_asset_key, **kwargs): 10428 """ 10429 Returns a list of all folders. 10430 10431 10432 :param str catalog_id: (required) 10433 Unique catalog identifier. 10434 10435 :param str data_asset_key: (required) 10436 Unique data asset key. 10437 10438 :param str display_name: (optional) 10439 A filter to return only resources that match the entire display name given. The match is not case sensitive. 10440 10441 :param str business_name: (optional) 10442 A filter to return only resources that match the entire business name given. The match is not case sensitive. 10443 10444 :param str display_or_business_name_contains: (optional) 10445 A filter to return only resources that match display name or business name pattern given. The match is not case sensitive. 10446 For Example : /folders?displayOrBusinessNameContains=Cu.* 10447 The above would match all folders with display name or business name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 10448 10449 :param str display_name_contains: (optional) 10450 A filter to return only resources that match display name pattern given. The match is not case sensitive. 10451 For Example : /folders?displayNameContains=Cu.* 10452 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 10453 10454 :param str lifecycle_state: (optional) 10455 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 10456 10457 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 10458 10459 :param str parent_folder_key: (optional) 10460 Unique folder key. 10461 10462 :param str path: (optional) 10463 Full path of the resource for resources that support paths. 10464 10465 :param str external_key: (optional) 10466 Unique external identifier of this resource in the external source system. 10467 10468 :param datetime time_created: (optional) 10469 Time that the resource was created. An `RFC3339`__ formatted datetime string. 10470 10471 __ https://tools.ietf.org/html/rfc3339 10472 10473 :param datetime time_updated: (optional) 10474 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 10475 10476 __ https://tools.ietf.org/html/rfc3339 10477 10478 :param str created_by_id: (optional) 10479 OCID of the user who created the resource. 10480 10481 :param str updated_by_id: (optional) 10482 OCID of the user who updated the resource. 10483 10484 :param str harvest_status: (optional) 10485 Harvest status of the harvestable resource as updated by the harvest process. 10486 10487 Allowed values are: "COMPLETE", "ERROR", "IN_PROGRESS", "DEFERRED" 10488 10489 :param str last_job_key: (optional) 10490 Key of the last harvest process to update this resource. 10491 10492 :param list[str] fields: (optional) 10493 Specifies the fields to return in a folder summary response. 10494 10495 Allowed values are: "key", "displayName", "description", "parentFolderKey", "path", "dataAssetKey", "externalKey", "timeExternal", "timeCreated", "lifecycleState", "uri" 10496 10497 :param str sort_by: (optional) 10498 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 10499 10500 Allowed values are: "TIMECREATED", "DISPLAYNAME" 10501 10502 :param str sort_order: (optional) 10503 The sort order to use, either 'asc' or 'desc'. 10504 10505 Allowed values are: "ASC", "DESC" 10506 10507 :param int limit: (optional) 10508 The maximum number of items to return. 10509 10510 :param str page: (optional) 10511 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 10512 10513 :param str opc_request_id: (optional) 10514 The client request ID for tracing. 10515 10516 :param obj retry_strategy: (optional) 10517 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10518 10519 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 10520 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10521 10522 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10523 10524 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.FolderCollection` 10525 :rtype: :class:`~oci.response.Response` 10526 10527 :example: 10528 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_folders.py.html>`__ to see an example of how to use list_folders API. 10529 """ 10530 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/folders" 10531 method = "GET" 10532 10533 # Don't accept unknown kwargs 10534 expected_kwargs = [ 10535 "retry_strategy", 10536 "display_name", 10537 "business_name", 10538 "display_or_business_name_contains", 10539 "display_name_contains", 10540 "lifecycle_state", 10541 "parent_folder_key", 10542 "path", 10543 "external_key", 10544 "time_created", 10545 "time_updated", 10546 "created_by_id", 10547 "updated_by_id", 10548 "harvest_status", 10549 "last_job_key", 10550 "fields", 10551 "sort_by", 10552 "sort_order", 10553 "limit", 10554 "page", 10555 "opc_request_id" 10556 ] 10557 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10558 if extra_kwargs: 10559 raise ValueError( 10560 "list_folders got unknown kwargs: {!r}".format(extra_kwargs)) 10561 10562 path_params = { 10563 "catalogId": catalog_id, 10564 "dataAssetKey": data_asset_key 10565 } 10566 10567 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10568 10569 for (k, v) in six.iteritems(path_params): 10570 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10571 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10572 10573 if 'lifecycle_state' in kwargs: 10574 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 10575 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 10576 raise ValueError( 10577 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 10578 ) 10579 10580 if 'harvest_status' in kwargs: 10581 harvest_status_allowed_values = ["COMPLETE", "ERROR", "IN_PROGRESS", "DEFERRED"] 10582 if kwargs['harvest_status'] not in harvest_status_allowed_values: 10583 raise ValueError( 10584 "Invalid value for `harvest_status`, must be one of {0}".format(harvest_status_allowed_values) 10585 ) 10586 10587 if 'fields' in kwargs: 10588 fields_allowed_values = ["key", "displayName", "description", "parentFolderKey", "path", "dataAssetKey", "externalKey", "timeExternal", "timeCreated", "lifecycleState", "uri"] 10589 for fields_item in kwargs['fields']: 10590 if fields_item not in fields_allowed_values: 10591 raise ValueError( 10592 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 10593 ) 10594 10595 if 'sort_by' in kwargs: 10596 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 10597 if kwargs['sort_by'] not in sort_by_allowed_values: 10598 raise ValueError( 10599 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 10600 ) 10601 10602 if 'sort_order' in kwargs: 10603 sort_order_allowed_values = ["ASC", "DESC"] 10604 if kwargs['sort_order'] not in sort_order_allowed_values: 10605 raise ValueError( 10606 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 10607 ) 10608 10609 query_params = { 10610 "displayName": kwargs.get("display_name", missing), 10611 "businessName": kwargs.get("business_name", missing), 10612 "displayOrBusinessNameContains": kwargs.get("display_or_business_name_contains", missing), 10613 "displayNameContains": kwargs.get("display_name_contains", missing), 10614 "lifecycleState": kwargs.get("lifecycle_state", missing), 10615 "parentFolderKey": kwargs.get("parent_folder_key", missing), 10616 "path": kwargs.get("path", missing), 10617 "externalKey": kwargs.get("external_key", missing), 10618 "timeCreated": kwargs.get("time_created", missing), 10619 "timeUpdated": kwargs.get("time_updated", missing), 10620 "createdById": kwargs.get("created_by_id", missing), 10621 "updatedById": kwargs.get("updated_by_id", missing), 10622 "harvestStatus": kwargs.get("harvest_status", missing), 10623 "lastJobKey": kwargs.get("last_job_key", missing), 10624 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 10625 "sortBy": kwargs.get("sort_by", missing), 10626 "sortOrder": kwargs.get("sort_order", missing), 10627 "limit": kwargs.get("limit", missing), 10628 "page": kwargs.get("page", missing) 10629 } 10630 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 10631 10632 header_params = { 10633 "accept": "application/json", 10634 "content-type": "application/json", 10635 "opc-request-id": kwargs.get("opc_request_id", missing) 10636 } 10637 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 10638 10639 retry_strategy = self.base_client.get_preferred_retry_strategy( 10640 operation_retry_strategy=kwargs.get('retry_strategy'), 10641 client_retry_strategy=self.retry_strategy 10642 ) 10643 if retry_strategy is None: 10644 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 10645 10646 if retry_strategy: 10647 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10648 self.base_client.add_opc_client_retries_header(header_params) 10649 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10650 return retry_strategy.make_retrying_call( 10651 self.base_client.call_api, 10652 resource_path=resource_path, 10653 method=method, 10654 path_params=path_params, 10655 query_params=query_params, 10656 header_params=header_params, 10657 response_type="FolderCollection") 10658 else: 10659 return self.base_client.call_api( 10660 resource_path=resource_path, 10661 method=method, 10662 path_params=path_params, 10663 query_params=query_params, 10664 header_params=header_params, 10665 response_type="FolderCollection") 10666 10667 def list_glossaries(self, catalog_id, **kwargs): 10668 """ 10669 Returns a list of all glossaries within a data catalog. 10670 10671 10672 :param str catalog_id: (required) 10673 Unique catalog identifier. 10674 10675 :param str display_name: (optional) 10676 A filter to return only resources that match the entire display name given. The match is not case sensitive. 10677 10678 :param str display_name_contains: (optional) 10679 A filter to return only resources that match display name pattern given. The match is not case sensitive. 10680 For Example : /folders?displayNameContains=Cu.* 10681 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 10682 10683 :param str lifecycle_state: (optional) 10684 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 10685 10686 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 10687 10688 :param datetime time_created: (optional) 10689 Time that the resource was created. An `RFC3339`__ formatted datetime string. 10690 10691 __ https://tools.ietf.org/html/rfc3339 10692 10693 :param datetime time_updated: (optional) 10694 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 10695 10696 __ https://tools.ietf.org/html/rfc3339 10697 10698 :param str created_by_id: (optional) 10699 OCID of the user who created the resource. 10700 10701 :param str updated_by_id: (optional) 10702 OCID of the user who updated the resource. 10703 10704 :param list[str] fields: (optional) 10705 Specifies the fields to return in a glossary summary response. 10706 10707 Allowed values are: "key", "displayName", "description", "catalogId", "lifecycleState", "timeCreated", "uri", "workflowStatus" 10708 10709 :param str sort_by: (optional) 10710 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 10711 10712 Allowed values are: "TIMECREATED", "DISPLAYNAME" 10713 10714 :param str sort_order: (optional) 10715 The sort order to use, either 'asc' or 'desc'. 10716 10717 Allowed values are: "ASC", "DESC" 10718 10719 :param int limit: (optional) 10720 The maximum number of items to return. 10721 10722 :param str page: (optional) 10723 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 10724 10725 :param str opc_request_id: (optional) 10726 The client request ID for tracing. 10727 10728 :param obj retry_strategy: (optional) 10729 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10730 10731 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 10732 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10733 10734 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10735 10736 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.GlossaryCollection` 10737 :rtype: :class:`~oci.response.Response` 10738 10739 :example: 10740 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_glossaries.py.html>`__ to see an example of how to use list_glossaries API. 10741 """ 10742 resource_path = "/catalogs/{catalogId}/glossaries" 10743 method = "GET" 10744 10745 # Don't accept unknown kwargs 10746 expected_kwargs = [ 10747 "retry_strategy", 10748 "display_name", 10749 "display_name_contains", 10750 "lifecycle_state", 10751 "time_created", 10752 "time_updated", 10753 "created_by_id", 10754 "updated_by_id", 10755 "fields", 10756 "sort_by", 10757 "sort_order", 10758 "limit", 10759 "page", 10760 "opc_request_id" 10761 ] 10762 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10763 if extra_kwargs: 10764 raise ValueError( 10765 "list_glossaries got unknown kwargs: {!r}".format(extra_kwargs)) 10766 10767 path_params = { 10768 "catalogId": catalog_id 10769 } 10770 10771 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10772 10773 for (k, v) in six.iteritems(path_params): 10774 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10775 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10776 10777 if 'lifecycle_state' in kwargs: 10778 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 10779 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 10780 raise ValueError( 10781 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 10782 ) 10783 10784 if 'fields' in kwargs: 10785 fields_allowed_values = ["key", "displayName", "description", "catalogId", "lifecycleState", "timeCreated", "uri", "workflowStatus"] 10786 for fields_item in kwargs['fields']: 10787 if fields_item not in fields_allowed_values: 10788 raise ValueError( 10789 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 10790 ) 10791 10792 if 'sort_by' in kwargs: 10793 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 10794 if kwargs['sort_by'] not in sort_by_allowed_values: 10795 raise ValueError( 10796 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 10797 ) 10798 10799 if 'sort_order' in kwargs: 10800 sort_order_allowed_values = ["ASC", "DESC"] 10801 if kwargs['sort_order'] not in sort_order_allowed_values: 10802 raise ValueError( 10803 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 10804 ) 10805 10806 query_params = { 10807 "displayName": kwargs.get("display_name", missing), 10808 "displayNameContains": kwargs.get("display_name_contains", missing), 10809 "lifecycleState": kwargs.get("lifecycle_state", missing), 10810 "timeCreated": kwargs.get("time_created", missing), 10811 "timeUpdated": kwargs.get("time_updated", missing), 10812 "createdById": kwargs.get("created_by_id", missing), 10813 "updatedById": kwargs.get("updated_by_id", missing), 10814 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 10815 "sortBy": kwargs.get("sort_by", missing), 10816 "sortOrder": kwargs.get("sort_order", missing), 10817 "limit": kwargs.get("limit", missing), 10818 "page": kwargs.get("page", missing) 10819 } 10820 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 10821 10822 header_params = { 10823 "accept": "application/json", 10824 "content-type": "application/json", 10825 "opc-request-id": kwargs.get("opc_request_id", missing) 10826 } 10827 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 10828 10829 retry_strategy = self.base_client.get_preferred_retry_strategy( 10830 operation_retry_strategy=kwargs.get('retry_strategy'), 10831 client_retry_strategy=self.retry_strategy 10832 ) 10833 if retry_strategy is None: 10834 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 10835 10836 if retry_strategy: 10837 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 10838 self.base_client.add_opc_client_retries_header(header_params) 10839 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 10840 return retry_strategy.make_retrying_call( 10841 self.base_client.call_api, 10842 resource_path=resource_path, 10843 method=method, 10844 path_params=path_params, 10845 query_params=query_params, 10846 header_params=header_params, 10847 response_type="GlossaryCollection") 10848 else: 10849 return self.base_client.call_api( 10850 resource_path=resource_path, 10851 method=method, 10852 path_params=path_params, 10853 query_params=query_params, 10854 header_params=header_params, 10855 response_type="GlossaryCollection") 10856 10857 def list_job_definitions(self, catalog_id, **kwargs): 10858 """ 10859 Returns a list of job definitions within a data catalog. 10860 10861 10862 :param str catalog_id: (required) 10863 Unique catalog identifier. 10864 10865 :param str display_name: (optional) 10866 A filter to return only resources that match the entire display name given. The match is not case sensitive. 10867 10868 :param str display_name_contains: (optional) 10869 A filter to return only resources that match display name pattern given. The match is not case sensitive. 10870 For Example : /folders?displayNameContains=Cu.* 10871 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 10872 10873 :param str job_execution_state: (optional) 10874 Job execution state. 10875 10876 Allowed values are: "CREATED", "IN_PROGRESS", "INACTIVE", "FAILED", "SUCCEEDED", "CANCELED", "SUCCEEDED_WITH_WARNINGS" 10877 10878 :param str lifecycle_state: (optional) 10879 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 10880 10881 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 10882 10883 :param str job_type: (optional) 10884 Job type. 10885 10886 Allowed values are: "HARVEST", "PROFILING", "SAMPLING", "PREVIEW", "IMPORT", "EXPORT", "IMPORT_GLOSSARY", "EXPORT_GLOSSARY", "INTERNAL", "PURGE", "IMMEDIATE", "SCHEDULED", "IMMEDIATE_EXECUTION", "SCHEDULED_EXECUTION", "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET" 10887 10888 :param bool is_incremental: (optional) 10889 Whether job definition is an incremental harvest (true) or a full harvest (false). 10890 10891 :param str data_asset_key: (optional) 10892 Unique data asset key. 10893 10894 :param str connection_key: (optional) 10895 Unique connection key. 10896 10897 :param datetime time_created: (optional) 10898 Time that the resource was created. An `RFC3339`__ formatted datetime string. 10899 10900 __ https://tools.ietf.org/html/rfc3339 10901 10902 :param datetime time_updated: (optional) 10903 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 10904 10905 __ https://tools.ietf.org/html/rfc3339 10906 10907 :param str created_by_id: (optional) 10908 OCID of the user who created the resource. 10909 10910 :param str updated_by_id: (optional) 10911 OCID of the user who updated the resource. 10912 10913 :param str sample_data_size_in_mbs: (optional) 10914 The sample data size in MB, specified as number of rows, for a metadata harvest. 10915 10916 :param list[str] fields: (optional) 10917 Specifies the fields to return in a job definition summary response. 10918 10919 Allowed values are: "key", "displayName", "description", "catalogId", "jobType", "connectionKey", "lifecycleState", "timeCreated", "isSampleDataExtracted", "uri", "timeLatestExecutionStarted", "timeLatestExecutionEnded", "jobExecutionState", "scheduleType" 10920 10921 :param str sort_by: (optional) 10922 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. Default order for TIMELATESTEXECUTIONSTARTED is descending. If no value is specified TIMECREATED is default. 10923 10924 Allowed values are: "TIMECREATED", "DISPLAYNAME", "TIMELATESTEXECUTIONSTARTED" 10925 10926 :param str sort_order: (optional) 10927 The sort order to use, either 'asc' or 'desc'. 10928 10929 Allowed values are: "ASC", "DESC" 10930 10931 :param int limit: (optional) 10932 The maximum number of items to return. 10933 10934 :param str page: (optional) 10935 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 10936 10937 :param str opc_request_id: (optional) 10938 The client request ID for tracing. 10939 10940 :param obj retry_strategy: (optional) 10941 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 10942 10943 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 10944 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 10945 10946 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 10947 10948 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobDefinitionCollection` 10949 :rtype: :class:`~oci.response.Response` 10950 10951 :example: 10952 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_job_definitions.py.html>`__ to see an example of how to use list_job_definitions API. 10953 """ 10954 resource_path = "/catalogs/{catalogId}/jobDefinitions" 10955 method = "GET" 10956 10957 # Don't accept unknown kwargs 10958 expected_kwargs = [ 10959 "retry_strategy", 10960 "display_name", 10961 "display_name_contains", 10962 "job_execution_state", 10963 "lifecycle_state", 10964 "job_type", 10965 "is_incremental", 10966 "data_asset_key", 10967 "connection_key", 10968 "time_created", 10969 "time_updated", 10970 "created_by_id", 10971 "updated_by_id", 10972 "sample_data_size_in_mbs", 10973 "fields", 10974 "sort_by", 10975 "sort_order", 10976 "limit", 10977 "page", 10978 "opc_request_id" 10979 ] 10980 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 10981 if extra_kwargs: 10982 raise ValueError( 10983 "list_job_definitions got unknown kwargs: {!r}".format(extra_kwargs)) 10984 10985 path_params = { 10986 "catalogId": catalog_id 10987 } 10988 10989 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 10990 10991 for (k, v) in six.iteritems(path_params): 10992 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 10993 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 10994 10995 if 'job_execution_state' in kwargs: 10996 job_execution_state_allowed_values = ["CREATED", "IN_PROGRESS", "INACTIVE", "FAILED", "SUCCEEDED", "CANCELED", "SUCCEEDED_WITH_WARNINGS"] 10997 if kwargs['job_execution_state'] not in job_execution_state_allowed_values: 10998 raise ValueError( 10999 "Invalid value for `job_execution_state`, must be one of {0}".format(job_execution_state_allowed_values) 11000 ) 11001 11002 if 'lifecycle_state' in kwargs: 11003 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 11004 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 11005 raise ValueError( 11006 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 11007 ) 11008 11009 if 'job_type' in kwargs: 11010 job_type_allowed_values = ["HARVEST", "PROFILING", "SAMPLING", "PREVIEW", "IMPORT", "EXPORT", "IMPORT_GLOSSARY", "EXPORT_GLOSSARY", "INTERNAL", "PURGE", "IMMEDIATE", "SCHEDULED", "IMMEDIATE_EXECUTION", "SCHEDULED_EXECUTION", "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET"] 11011 if kwargs['job_type'] not in job_type_allowed_values: 11012 raise ValueError( 11013 "Invalid value for `job_type`, must be one of {0}".format(job_type_allowed_values) 11014 ) 11015 11016 if 'fields' in kwargs: 11017 fields_allowed_values = ["key", "displayName", "description", "catalogId", "jobType", "connectionKey", "lifecycleState", "timeCreated", "isSampleDataExtracted", "uri", "timeLatestExecutionStarted", "timeLatestExecutionEnded", "jobExecutionState", "scheduleType"] 11018 for fields_item in kwargs['fields']: 11019 if fields_item not in fields_allowed_values: 11020 raise ValueError( 11021 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 11022 ) 11023 11024 if 'sort_by' in kwargs: 11025 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME", "TIMELATESTEXECUTIONSTARTED"] 11026 if kwargs['sort_by'] not in sort_by_allowed_values: 11027 raise ValueError( 11028 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 11029 ) 11030 11031 if 'sort_order' in kwargs: 11032 sort_order_allowed_values = ["ASC", "DESC"] 11033 if kwargs['sort_order'] not in sort_order_allowed_values: 11034 raise ValueError( 11035 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 11036 ) 11037 11038 query_params = { 11039 "displayName": kwargs.get("display_name", missing), 11040 "displayNameContains": kwargs.get("display_name_contains", missing), 11041 "jobExecutionState": kwargs.get("job_execution_state", missing), 11042 "lifecycleState": kwargs.get("lifecycle_state", missing), 11043 "jobType": kwargs.get("job_type", missing), 11044 "isIncremental": kwargs.get("is_incremental", missing), 11045 "dataAssetKey": kwargs.get("data_asset_key", missing), 11046 "connectionKey": kwargs.get("connection_key", missing), 11047 "timeCreated": kwargs.get("time_created", missing), 11048 "timeUpdated": kwargs.get("time_updated", missing), 11049 "createdById": kwargs.get("created_by_id", missing), 11050 "updatedById": kwargs.get("updated_by_id", missing), 11051 "sampleDataSizeInMBs": kwargs.get("sample_data_size_in_mbs", missing), 11052 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 11053 "sortBy": kwargs.get("sort_by", missing), 11054 "sortOrder": kwargs.get("sort_order", missing), 11055 "limit": kwargs.get("limit", missing), 11056 "page": kwargs.get("page", missing) 11057 } 11058 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 11059 11060 header_params = { 11061 "accept": "application/json", 11062 "content-type": "application/json", 11063 "opc-request-id": kwargs.get("opc_request_id", missing) 11064 } 11065 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11066 11067 retry_strategy = self.base_client.get_preferred_retry_strategy( 11068 operation_retry_strategy=kwargs.get('retry_strategy'), 11069 client_retry_strategy=self.retry_strategy 11070 ) 11071 if retry_strategy is None: 11072 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 11073 11074 if retry_strategy: 11075 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11076 self.base_client.add_opc_client_retries_header(header_params) 11077 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11078 return retry_strategy.make_retrying_call( 11079 self.base_client.call_api, 11080 resource_path=resource_path, 11081 method=method, 11082 path_params=path_params, 11083 query_params=query_params, 11084 header_params=header_params, 11085 response_type="JobDefinitionCollection") 11086 else: 11087 return self.base_client.call_api( 11088 resource_path=resource_path, 11089 method=method, 11090 path_params=path_params, 11091 query_params=query_params, 11092 header_params=header_params, 11093 response_type="JobDefinitionCollection") 11094 11095 def list_job_executions(self, catalog_id, job_key, **kwargs): 11096 """ 11097 Returns a list of job executions for a job. 11098 11099 11100 :param str catalog_id: (required) 11101 Unique catalog identifier. 11102 11103 :param str job_key: (required) 11104 Unique job key. 11105 11106 :param str lifecycle_state: (optional) 11107 Job execution lifecycle state. 11108 11109 Allowed values are: "CREATED", "IN_PROGRESS", "INACTIVE", "FAILED", "SUCCEEDED", "CANCELED", "SUCCEEDED_WITH_WARNINGS" 11110 11111 :param datetime time_created: (optional) 11112 Time that the resource was created. An `RFC3339`__ formatted datetime string. 11113 11114 __ https://tools.ietf.org/html/rfc3339 11115 11116 :param datetime time_updated: (optional) 11117 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 11118 11119 __ https://tools.ietf.org/html/rfc3339 11120 11121 :param str created_by_id: (optional) 11122 OCID of the user who created the resource. 11123 11124 :param str updated_by_id: (optional) 11125 OCID of the user who updated the resource. 11126 11127 :param str job_type: (optional) 11128 Job type. 11129 11130 Allowed values are: "HARVEST", "PROFILING", "SAMPLING", "PREVIEW", "IMPORT", "EXPORT", "IMPORT_GLOSSARY", "EXPORT_GLOSSARY", "INTERNAL", "PURGE", "IMMEDIATE", "SCHEDULED", "IMMEDIATE_EXECUTION", "SCHEDULED_EXECUTION", "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET" 11131 11132 :param str sub_type: (optional) 11133 Sub-type of this job execution. 11134 11135 :param str parent_key: (optional) 11136 The unique key of the parent execution or null if this job execution has no parent. 11137 11138 :param datetime time_start: (optional) 11139 Time that the job execution was started or in the case of a future time, the time when the job will start. 11140 An `RFC3339`__ formatted datetime string. 11141 11142 __ https://tools.ietf.org/html/rfc3339 11143 11144 :param datetime time_end: (optional) 11145 Time that the job execution ended or null if the job is still running or hasn't run yet. 11146 An `RFC3339`__ formatted datetime string. 11147 11148 __ https://tools.ietf.org/html/rfc3339 11149 11150 :param str error_code: (optional) 11151 Error code returned from the job execution or null if job is still running or didn't return an error. 11152 11153 :param str error_message: (optional) 11154 Error message returned from the job execution or null if job is still running or didn't return an error. 11155 11156 :param str process_key: (optional) 11157 Process identifier related to the job execution. 11158 11159 :param str external_url: (optional) 11160 The a URL of the job for accessing this resource and its status. 11161 11162 :param str event_key: (optional) 11163 Event that triggered the execution of this job or null. 11164 11165 :param str data_entity_key: (optional) 11166 Unique entity key. 11167 11168 :param list[str] fields: (optional) 11169 Specifies the fields to return in a job execution summary response. 11170 11171 Allowed values are: "key", "jobKey", "jobType", "parentKey", "scheduleInstanceKey", "lifecycleState", "timeCreated", "timeStarted", "timeEnded", "uri" 11172 11173 :param str sort_by: (optional) 11174 The field to sort by. Only one sort order may be provided; the default is descending. Use sortOrder query param to specify order. 11175 11176 Allowed values are: "TIMECREATED" 11177 11178 :param str sort_order: (optional) 11179 The sort order to use, either 'asc' or 'desc'. 11180 11181 Allowed values are: "ASC", "DESC" 11182 11183 :param int limit: (optional) 11184 The maximum number of items to return. 11185 11186 :param str page: (optional) 11187 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 11188 11189 :param str opc_request_id: (optional) 11190 The client request ID for tracing. 11191 11192 :param obj retry_strategy: (optional) 11193 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11194 11195 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 11196 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11197 11198 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11199 11200 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobExecutionCollection` 11201 :rtype: :class:`~oci.response.Response` 11202 11203 :example: 11204 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_job_executions.py.html>`__ to see an example of how to use list_job_executions API. 11205 """ 11206 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}/executions" 11207 method = "GET" 11208 11209 # Don't accept unknown kwargs 11210 expected_kwargs = [ 11211 "retry_strategy", 11212 "lifecycle_state", 11213 "time_created", 11214 "time_updated", 11215 "created_by_id", 11216 "updated_by_id", 11217 "job_type", 11218 "sub_type", 11219 "parent_key", 11220 "time_start", 11221 "time_end", 11222 "error_code", 11223 "error_message", 11224 "process_key", 11225 "external_url", 11226 "event_key", 11227 "data_entity_key", 11228 "fields", 11229 "sort_by", 11230 "sort_order", 11231 "limit", 11232 "page", 11233 "opc_request_id" 11234 ] 11235 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11236 if extra_kwargs: 11237 raise ValueError( 11238 "list_job_executions got unknown kwargs: {!r}".format(extra_kwargs)) 11239 11240 path_params = { 11241 "catalogId": catalog_id, 11242 "jobKey": job_key 11243 } 11244 11245 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11246 11247 for (k, v) in six.iteritems(path_params): 11248 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11249 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11250 11251 if 'lifecycle_state' in kwargs: 11252 lifecycle_state_allowed_values = ["CREATED", "IN_PROGRESS", "INACTIVE", "FAILED", "SUCCEEDED", "CANCELED", "SUCCEEDED_WITH_WARNINGS"] 11253 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 11254 raise ValueError( 11255 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 11256 ) 11257 11258 if 'job_type' in kwargs: 11259 job_type_allowed_values = ["HARVEST", "PROFILING", "SAMPLING", "PREVIEW", "IMPORT", "EXPORT", "IMPORT_GLOSSARY", "EXPORT_GLOSSARY", "INTERNAL", "PURGE", "IMMEDIATE", "SCHEDULED", "IMMEDIATE_EXECUTION", "SCHEDULED_EXECUTION", "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET"] 11260 if kwargs['job_type'] not in job_type_allowed_values: 11261 raise ValueError( 11262 "Invalid value for `job_type`, must be one of {0}".format(job_type_allowed_values) 11263 ) 11264 11265 if 'fields' in kwargs: 11266 fields_allowed_values = ["key", "jobKey", "jobType", "parentKey", "scheduleInstanceKey", "lifecycleState", "timeCreated", "timeStarted", "timeEnded", "uri"] 11267 for fields_item in kwargs['fields']: 11268 if fields_item not in fields_allowed_values: 11269 raise ValueError( 11270 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 11271 ) 11272 11273 if 'sort_by' in kwargs: 11274 sort_by_allowed_values = ["TIMECREATED"] 11275 if kwargs['sort_by'] not in sort_by_allowed_values: 11276 raise ValueError( 11277 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 11278 ) 11279 11280 if 'sort_order' in kwargs: 11281 sort_order_allowed_values = ["ASC", "DESC"] 11282 if kwargs['sort_order'] not in sort_order_allowed_values: 11283 raise ValueError( 11284 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 11285 ) 11286 11287 query_params = { 11288 "lifecycleState": kwargs.get("lifecycle_state", missing), 11289 "timeCreated": kwargs.get("time_created", missing), 11290 "timeUpdated": kwargs.get("time_updated", missing), 11291 "createdById": kwargs.get("created_by_id", missing), 11292 "updatedById": kwargs.get("updated_by_id", missing), 11293 "jobType": kwargs.get("job_type", missing), 11294 "subType": kwargs.get("sub_type", missing), 11295 "parentKey": kwargs.get("parent_key", missing), 11296 "timeStart": kwargs.get("time_start", missing), 11297 "timeEnd": kwargs.get("time_end", missing), 11298 "errorCode": kwargs.get("error_code", missing), 11299 "errorMessage": kwargs.get("error_message", missing), 11300 "processKey": kwargs.get("process_key", missing), 11301 "externalUrl": kwargs.get("external_url", missing), 11302 "eventKey": kwargs.get("event_key", missing), 11303 "dataEntityKey": kwargs.get("data_entity_key", missing), 11304 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 11305 "sortBy": kwargs.get("sort_by", missing), 11306 "sortOrder": kwargs.get("sort_order", missing), 11307 "limit": kwargs.get("limit", missing), 11308 "page": kwargs.get("page", missing) 11309 } 11310 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 11311 11312 header_params = { 11313 "accept": "application/json", 11314 "content-type": "application/json", 11315 "opc-request-id": kwargs.get("opc_request_id", missing) 11316 } 11317 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11318 11319 retry_strategy = self.base_client.get_preferred_retry_strategy( 11320 operation_retry_strategy=kwargs.get('retry_strategy'), 11321 client_retry_strategy=self.retry_strategy 11322 ) 11323 if retry_strategy is None: 11324 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 11325 11326 if retry_strategy: 11327 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11328 self.base_client.add_opc_client_retries_header(header_params) 11329 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11330 return retry_strategy.make_retrying_call( 11331 self.base_client.call_api, 11332 resource_path=resource_path, 11333 method=method, 11334 path_params=path_params, 11335 query_params=query_params, 11336 header_params=header_params, 11337 response_type="JobExecutionCollection") 11338 else: 11339 return self.base_client.call_api( 11340 resource_path=resource_path, 11341 method=method, 11342 path_params=path_params, 11343 query_params=query_params, 11344 header_params=header_params, 11345 response_type="JobExecutionCollection") 11346 11347 def list_job_logs(self, catalog_id, job_key, job_execution_key, **kwargs): 11348 """ 11349 Returns a list of job logs. 11350 11351 11352 :param str catalog_id: (required) 11353 Unique catalog identifier. 11354 11355 :param str job_key: (required) 11356 Unique job key. 11357 11358 :param str job_execution_key: (required) 11359 The key of the job execution. 11360 11361 :param str lifecycle_state: (optional) 11362 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 11363 11364 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 11365 11366 :param str severity: (optional) 11367 Severity level for this Log. 11368 11369 :param datetime time_created: (optional) 11370 Time that the resource was created. An `RFC3339`__ formatted datetime string. 11371 11372 __ https://tools.ietf.org/html/rfc3339 11373 11374 :param datetime time_updated: (optional) 11375 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 11376 11377 __ https://tools.ietf.org/html/rfc3339 11378 11379 :param str created_by_id: (optional) 11380 OCID of the user who created the resource. 11381 11382 :param str updated_by_id: (optional) 11383 OCID of the user who updated the resource. 11384 11385 :param list[str] fields: (optional) 11386 Specifies the fields to return in a job log summary response. 11387 11388 Allowed values are: "key", "jobExecutionKey", "severity", "timeCreated", "logMessage", "uri" 11389 11390 :param str sort_by: (optional) 11391 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 11392 11393 Allowed values are: "TIMECREATED", "DISPLAYNAME" 11394 11395 :param str sort_order: (optional) 11396 The sort order to use, either 'asc' or 'desc'. 11397 11398 Allowed values are: "ASC", "DESC" 11399 11400 :param int limit: (optional) 11401 The maximum number of items to return. 11402 11403 :param str page: (optional) 11404 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 11405 11406 :param str opc_request_id: (optional) 11407 The client request ID for tracing. 11408 11409 :param obj retry_strategy: (optional) 11410 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11411 11412 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 11413 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11414 11415 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11416 11417 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobLogCollection` 11418 :rtype: :class:`~oci.response.Response` 11419 11420 :example: 11421 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_job_logs.py.html>`__ to see an example of how to use list_job_logs API. 11422 """ 11423 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}/executions/{jobExecutionKey}/logs" 11424 method = "GET" 11425 11426 # Don't accept unknown kwargs 11427 expected_kwargs = [ 11428 "retry_strategy", 11429 "lifecycle_state", 11430 "severity", 11431 "time_created", 11432 "time_updated", 11433 "created_by_id", 11434 "updated_by_id", 11435 "fields", 11436 "sort_by", 11437 "sort_order", 11438 "limit", 11439 "page", 11440 "opc_request_id" 11441 ] 11442 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11443 if extra_kwargs: 11444 raise ValueError( 11445 "list_job_logs got unknown kwargs: {!r}".format(extra_kwargs)) 11446 11447 path_params = { 11448 "catalogId": catalog_id, 11449 "jobKey": job_key, 11450 "jobExecutionKey": job_execution_key 11451 } 11452 11453 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11454 11455 for (k, v) in six.iteritems(path_params): 11456 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11457 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11458 11459 if 'lifecycle_state' in kwargs: 11460 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 11461 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 11462 raise ValueError( 11463 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 11464 ) 11465 11466 if 'fields' in kwargs: 11467 fields_allowed_values = ["key", "jobExecutionKey", "severity", "timeCreated", "logMessage", "uri"] 11468 for fields_item in kwargs['fields']: 11469 if fields_item not in fields_allowed_values: 11470 raise ValueError( 11471 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 11472 ) 11473 11474 if 'sort_by' in kwargs: 11475 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 11476 if kwargs['sort_by'] not in sort_by_allowed_values: 11477 raise ValueError( 11478 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 11479 ) 11480 11481 if 'sort_order' in kwargs: 11482 sort_order_allowed_values = ["ASC", "DESC"] 11483 if kwargs['sort_order'] not in sort_order_allowed_values: 11484 raise ValueError( 11485 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 11486 ) 11487 11488 query_params = { 11489 "lifecycleState": kwargs.get("lifecycle_state", missing), 11490 "severity": kwargs.get("severity", missing), 11491 "timeCreated": kwargs.get("time_created", missing), 11492 "timeUpdated": kwargs.get("time_updated", missing), 11493 "createdById": kwargs.get("created_by_id", missing), 11494 "updatedById": kwargs.get("updated_by_id", missing), 11495 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 11496 "sortBy": kwargs.get("sort_by", missing), 11497 "sortOrder": kwargs.get("sort_order", missing), 11498 "limit": kwargs.get("limit", missing), 11499 "page": kwargs.get("page", missing) 11500 } 11501 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 11502 11503 header_params = { 11504 "accept": "application/json", 11505 "content-type": "application/json", 11506 "opc-request-id": kwargs.get("opc_request_id", missing) 11507 } 11508 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11509 11510 retry_strategy = self.base_client.get_preferred_retry_strategy( 11511 operation_retry_strategy=kwargs.get('retry_strategy'), 11512 client_retry_strategy=self.retry_strategy 11513 ) 11514 if retry_strategy is None: 11515 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 11516 11517 if retry_strategy: 11518 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11519 self.base_client.add_opc_client_retries_header(header_params) 11520 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11521 return retry_strategy.make_retrying_call( 11522 self.base_client.call_api, 11523 resource_path=resource_path, 11524 method=method, 11525 path_params=path_params, 11526 query_params=query_params, 11527 header_params=header_params, 11528 response_type="JobLogCollection") 11529 else: 11530 return self.base_client.call_api( 11531 resource_path=resource_path, 11532 method=method, 11533 path_params=path_params, 11534 query_params=query_params, 11535 header_params=header_params, 11536 response_type="JobLogCollection") 11537 11538 def list_job_metrics(self, catalog_id, job_key, job_execution_key, **kwargs): 11539 """ 11540 Returns a list of job metrics. 11541 11542 11543 :param str catalog_id: (required) 11544 Unique catalog identifier. 11545 11546 :param str job_key: (required) 11547 Unique job key. 11548 11549 :param str job_execution_key: (required) 11550 The key of the job execution. 11551 11552 :param str display_name: (optional) 11553 A filter to return only resources that match the entire display name given. The match is not case sensitive. 11554 11555 :param str display_name_contains: (optional) 11556 A filter to return only resources that match display name pattern given. The match is not case sensitive. 11557 For Example : /folders?displayNameContains=Cu.* 11558 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 11559 11560 :param str category: (optional) 11561 Category of this metric. 11562 11563 :param str sub_category: (optional) 11564 Sub category of this metric under the category. Used for aggregating values. May be null. 11565 11566 :param str unit: (optional) 11567 Unit of this metric. 11568 11569 :param str value: (optional) 11570 Value of this metric. 11571 11572 :param str batch_key: (optional) 11573 Batch key for grouping, may be null. 11574 11575 :param datetime time_created: (optional) 11576 Time that the resource was created. An `RFC3339`__ formatted datetime string. 11577 11578 __ https://tools.ietf.org/html/rfc3339 11579 11580 :param datetime time_updated: (optional) 11581 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 11582 11583 __ https://tools.ietf.org/html/rfc3339 11584 11585 :param datetime time_inserted: (optional) 11586 The time the metric was logged or captured in the system where the job executed. 11587 An `RFC3339`__ formatted datetime string. 11588 11589 __ https://tools.ietf.org/html/rfc3339 11590 11591 :param str created_by_id: (optional) 11592 OCID of the user who created the resource. 11593 11594 :param str updated_by_id: (optional) 11595 OCID of the user who updated the resource. 11596 11597 :param list[str] fields: (optional) 11598 Specifies the fields to return in a job metric summary response. 11599 11600 Allowed values are: "key", "description", "displayName", "timeInserted", "category", "subCategory", "unit", "value", "batchKey", "jobExecutionKey", "timeCreated", "uri" 11601 11602 :param str sort_by: (optional) 11603 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 11604 11605 Allowed values are: "TIMECREATED", "DISPLAYNAME" 11606 11607 :param str sort_order: (optional) 11608 The sort order to use, either 'asc' or 'desc'. 11609 11610 Allowed values are: "ASC", "DESC" 11611 11612 :param int limit: (optional) 11613 The maximum number of items to return. 11614 11615 :param str page: (optional) 11616 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 11617 11618 :param str opc_request_id: (optional) 11619 The client request ID for tracing. 11620 11621 :param obj retry_strategy: (optional) 11622 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11623 11624 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 11625 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11626 11627 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11628 11629 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobMetricCollection` 11630 :rtype: :class:`~oci.response.Response` 11631 11632 :example: 11633 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_job_metrics.py.html>`__ to see an example of how to use list_job_metrics API. 11634 """ 11635 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}/executions/{jobExecutionKey}/metrics" 11636 method = "GET" 11637 11638 # Don't accept unknown kwargs 11639 expected_kwargs = [ 11640 "retry_strategy", 11641 "display_name", 11642 "display_name_contains", 11643 "category", 11644 "sub_category", 11645 "unit", 11646 "value", 11647 "batch_key", 11648 "time_created", 11649 "time_updated", 11650 "time_inserted", 11651 "created_by_id", 11652 "updated_by_id", 11653 "fields", 11654 "sort_by", 11655 "sort_order", 11656 "limit", 11657 "page", 11658 "opc_request_id" 11659 ] 11660 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11661 if extra_kwargs: 11662 raise ValueError( 11663 "list_job_metrics got unknown kwargs: {!r}".format(extra_kwargs)) 11664 11665 path_params = { 11666 "catalogId": catalog_id, 11667 "jobKey": job_key, 11668 "jobExecutionKey": job_execution_key 11669 } 11670 11671 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11672 11673 for (k, v) in six.iteritems(path_params): 11674 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11675 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11676 11677 if 'fields' in kwargs: 11678 fields_allowed_values = ["key", "description", "displayName", "timeInserted", "category", "subCategory", "unit", "value", "batchKey", "jobExecutionKey", "timeCreated", "uri"] 11679 for fields_item in kwargs['fields']: 11680 if fields_item not in fields_allowed_values: 11681 raise ValueError( 11682 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 11683 ) 11684 11685 if 'sort_by' in kwargs: 11686 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 11687 if kwargs['sort_by'] not in sort_by_allowed_values: 11688 raise ValueError( 11689 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 11690 ) 11691 11692 if 'sort_order' in kwargs: 11693 sort_order_allowed_values = ["ASC", "DESC"] 11694 if kwargs['sort_order'] not in sort_order_allowed_values: 11695 raise ValueError( 11696 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 11697 ) 11698 11699 query_params = { 11700 "displayName": kwargs.get("display_name", missing), 11701 "displayNameContains": kwargs.get("display_name_contains", missing), 11702 "category": kwargs.get("category", missing), 11703 "subCategory": kwargs.get("sub_category", missing), 11704 "unit": kwargs.get("unit", missing), 11705 "value": kwargs.get("value", missing), 11706 "batchKey": kwargs.get("batch_key", missing), 11707 "timeCreated": kwargs.get("time_created", missing), 11708 "timeUpdated": kwargs.get("time_updated", missing), 11709 "timeInserted": kwargs.get("time_inserted", missing), 11710 "createdById": kwargs.get("created_by_id", missing), 11711 "updatedById": kwargs.get("updated_by_id", missing), 11712 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 11713 "sortBy": kwargs.get("sort_by", missing), 11714 "sortOrder": kwargs.get("sort_order", missing), 11715 "limit": kwargs.get("limit", missing), 11716 "page": kwargs.get("page", missing) 11717 } 11718 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 11719 11720 header_params = { 11721 "accept": "application/json", 11722 "content-type": "application/json", 11723 "opc-request-id": kwargs.get("opc_request_id", missing) 11724 } 11725 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11726 11727 retry_strategy = self.base_client.get_preferred_retry_strategy( 11728 operation_retry_strategy=kwargs.get('retry_strategy'), 11729 client_retry_strategy=self.retry_strategy 11730 ) 11731 if retry_strategy is None: 11732 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 11733 11734 if retry_strategy: 11735 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 11736 self.base_client.add_opc_client_retries_header(header_params) 11737 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 11738 return retry_strategy.make_retrying_call( 11739 self.base_client.call_api, 11740 resource_path=resource_path, 11741 method=method, 11742 path_params=path_params, 11743 query_params=query_params, 11744 header_params=header_params, 11745 response_type="JobMetricCollection") 11746 else: 11747 return self.base_client.call_api( 11748 resource_path=resource_path, 11749 method=method, 11750 path_params=path_params, 11751 query_params=query_params, 11752 header_params=header_params, 11753 response_type="JobMetricCollection") 11754 11755 def list_jobs(self, catalog_id, **kwargs): 11756 """ 11757 Returns a list of jobs within a data catalog. 11758 11759 11760 :param str catalog_id: (required) 11761 Unique catalog identifier. 11762 11763 :param str display_name: (optional) 11764 A filter to return only resources that match the entire display name given. The match is not case sensitive. 11765 11766 :param str display_name_contains: (optional) 11767 A filter to return only resources that match display name pattern given. The match is not case sensitive. 11768 For Example : /folders?displayNameContains=Cu.* 11769 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 11770 11771 :param str lifecycle_state: (optional) 11772 Job lifecycle state. 11773 11774 Allowed values are: "ACTIVE", "INACTIVE", "EXPIRED" 11775 11776 :param datetime time_created: (optional) 11777 Time that the resource was created. An `RFC3339`__ formatted datetime string. 11778 11779 __ https://tools.ietf.org/html/rfc3339 11780 11781 :param datetime time_updated: (optional) 11782 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 11783 11784 __ https://tools.ietf.org/html/rfc3339 11785 11786 :param str created_by_id: (optional) 11787 OCID of the user who created the resource. 11788 11789 :param str updated_by_id: (optional) 11790 OCID of the user who updated the resource. 11791 11792 :param str job_type: (optional) 11793 Job type. 11794 11795 Allowed values are: "HARVEST", "PROFILING", "SAMPLING", "PREVIEW", "IMPORT", "EXPORT", "IMPORT_GLOSSARY", "EXPORT_GLOSSARY", "INTERNAL", "PURGE", "IMMEDIATE", "SCHEDULED", "IMMEDIATE_EXECUTION", "SCHEDULED_EXECUTION", "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET" 11796 11797 :param str job_definition_key: (optional) 11798 Unique job definition key. 11799 11800 :param str data_asset_key: (optional) 11801 Unique data asset key. 11802 11803 :param str schedule_cron_expression: (optional) 11804 Schedule specified in the cron expression format that has seven fields for second, minute, hour, day-of-month, month, day-of-week, year. 11805 It can also include special characters like * for all and ? for any. There are also pre-defined schedules that can be specified using 11806 special strings. For example, @hourly will run the job every hour. 11807 11808 :param datetime time_schedule_begin: (optional) 11809 Date that the schedule should be operational. An `RFC3339`__ formatted datetime string. 11810 11811 __ https://tools.ietf.org/html/rfc3339 11812 11813 :param datetime time_schedule_end: (optional) 11814 Date that the schedule should end from being operational. An `RFC3339`__ formatted datetime string. 11815 11816 __ https://tools.ietf.org/html/rfc3339 11817 11818 :param str schedule_type: (optional) 11819 Type of the job schedule. 11820 11821 Allowed values are: "SCHEDULED", "IMMEDIATE" 11822 11823 :param str connection_key: (optional) 11824 Unique connection key. 11825 11826 :param list[str] fields: (optional) 11827 Specifies the fields to return in a job summary response. 11828 11829 Allowed values are: "key", "displayName", "description", "catalogId", "jobDefinitionKey", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "jobType", "scheduleCronExpression", "timeScheduleBegin", "scheduleType", "executionCount", "timeOfLatestExecution", "executions", "uri", "jobDefinitionName", "errorCode", "errorMessage" 11830 11831 :param int execution_count: (optional) 11832 The total number of executions for this job schedule. 11833 11834 :param datetime time_of_latest_execution: (optional) 11835 The date and time the most recent execution for this job ,in the format defined by `RFC3339`__. 11836 Example: `2019-03-25T21:10:29.600Z` 11837 11838 __ https://tools.ietf.org/html/rfc3339 11839 11840 :param str sort_by: (optional) 11841 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 11842 11843 Allowed values are: "TIMECREATED", "DISPLAYNAME" 11844 11845 :param str sort_order: (optional) 11846 The sort order to use, either 'asc' or 'desc'. 11847 11848 Allowed values are: "ASC", "DESC" 11849 11850 :param int limit: (optional) 11851 The maximum number of items to return. 11852 11853 :param str page: (optional) 11854 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 11855 11856 :param str opc_request_id: (optional) 11857 The client request ID for tracing. 11858 11859 :param obj retry_strategy: (optional) 11860 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 11861 11862 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 11863 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 11864 11865 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 11866 11867 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobCollection` 11868 :rtype: :class:`~oci.response.Response` 11869 11870 :example: 11871 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_jobs.py.html>`__ to see an example of how to use list_jobs API. 11872 """ 11873 resource_path = "/catalogs/{catalogId}/jobs" 11874 method = "GET" 11875 11876 # Don't accept unknown kwargs 11877 expected_kwargs = [ 11878 "retry_strategy", 11879 "display_name", 11880 "display_name_contains", 11881 "lifecycle_state", 11882 "time_created", 11883 "time_updated", 11884 "created_by_id", 11885 "updated_by_id", 11886 "job_type", 11887 "job_definition_key", 11888 "data_asset_key", 11889 "schedule_cron_expression", 11890 "time_schedule_begin", 11891 "time_schedule_end", 11892 "schedule_type", 11893 "connection_key", 11894 "fields", 11895 "execution_count", 11896 "time_of_latest_execution", 11897 "sort_by", 11898 "sort_order", 11899 "limit", 11900 "page", 11901 "opc_request_id" 11902 ] 11903 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 11904 if extra_kwargs: 11905 raise ValueError( 11906 "list_jobs got unknown kwargs: {!r}".format(extra_kwargs)) 11907 11908 path_params = { 11909 "catalogId": catalog_id 11910 } 11911 11912 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 11913 11914 for (k, v) in six.iteritems(path_params): 11915 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 11916 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 11917 11918 if 'lifecycle_state' in kwargs: 11919 lifecycle_state_allowed_values = ["ACTIVE", "INACTIVE", "EXPIRED"] 11920 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 11921 raise ValueError( 11922 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 11923 ) 11924 11925 if 'job_type' in kwargs: 11926 job_type_allowed_values = ["HARVEST", "PROFILING", "SAMPLING", "PREVIEW", "IMPORT", "EXPORT", "IMPORT_GLOSSARY", "EXPORT_GLOSSARY", "INTERNAL", "PURGE", "IMMEDIATE", "SCHEDULED", "IMMEDIATE_EXECUTION", "SCHEDULED_EXECUTION", "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET"] 11927 if kwargs['job_type'] not in job_type_allowed_values: 11928 raise ValueError( 11929 "Invalid value for `job_type`, must be one of {0}".format(job_type_allowed_values) 11930 ) 11931 11932 if 'schedule_type' in kwargs: 11933 schedule_type_allowed_values = ["SCHEDULED", "IMMEDIATE"] 11934 if kwargs['schedule_type'] not in schedule_type_allowed_values: 11935 raise ValueError( 11936 "Invalid value for `schedule_type`, must be one of {0}".format(schedule_type_allowed_values) 11937 ) 11938 11939 if 'fields' in kwargs: 11940 fields_allowed_values = ["key", "displayName", "description", "catalogId", "jobDefinitionKey", "lifecycleState", "timeCreated", "timeUpdated", "createdById", "updatedById", "jobType", "scheduleCronExpression", "timeScheduleBegin", "scheduleType", "executionCount", "timeOfLatestExecution", "executions", "uri", "jobDefinitionName", "errorCode", "errorMessage"] 11941 for fields_item in kwargs['fields']: 11942 if fields_item not in fields_allowed_values: 11943 raise ValueError( 11944 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 11945 ) 11946 11947 if 'sort_by' in kwargs: 11948 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 11949 if kwargs['sort_by'] not in sort_by_allowed_values: 11950 raise ValueError( 11951 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 11952 ) 11953 11954 if 'sort_order' in kwargs: 11955 sort_order_allowed_values = ["ASC", "DESC"] 11956 if kwargs['sort_order'] not in sort_order_allowed_values: 11957 raise ValueError( 11958 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 11959 ) 11960 11961 query_params = { 11962 "displayName": kwargs.get("display_name", missing), 11963 "displayNameContains": kwargs.get("display_name_contains", missing), 11964 "lifecycleState": kwargs.get("lifecycle_state", missing), 11965 "timeCreated": kwargs.get("time_created", missing), 11966 "timeUpdated": kwargs.get("time_updated", missing), 11967 "createdById": kwargs.get("created_by_id", missing), 11968 "updatedById": kwargs.get("updated_by_id", missing), 11969 "jobType": kwargs.get("job_type", missing), 11970 "jobDefinitionKey": kwargs.get("job_definition_key", missing), 11971 "dataAssetKey": kwargs.get("data_asset_key", missing), 11972 "scheduleCronExpression": kwargs.get("schedule_cron_expression", missing), 11973 "timeScheduleBegin": kwargs.get("time_schedule_begin", missing), 11974 "timeScheduleEnd": kwargs.get("time_schedule_end", missing), 11975 "scheduleType": kwargs.get("schedule_type", missing), 11976 "connectionKey": kwargs.get("connection_key", missing), 11977 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 11978 "executionCount": kwargs.get("execution_count", missing), 11979 "timeOfLatestExecution": kwargs.get("time_of_latest_execution", missing), 11980 "sortBy": kwargs.get("sort_by", missing), 11981 "sortOrder": kwargs.get("sort_order", missing), 11982 "limit": kwargs.get("limit", missing), 11983 "page": kwargs.get("page", missing) 11984 } 11985 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 11986 11987 header_params = { 11988 "accept": "application/json", 11989 "content-type": "application/json", 11990 "opc-request-id": kwargs.get("opc_request_id", missing) 11991 } 11992 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 11993 11994 retry_strategy = self.base_client.get_preferred_retry_strategy( 11995 operation_retry_strategy=kwargs.get('retry_strategy'), 11996 client_retry_strategy=self.retry_strategy 11997 ) 11998 if retry_strategy is None: 11999 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 12000 12001 if retry_strategy: 12002 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12003 self.base_client.add_opc_client_retries_header(header_params) 12004 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12005 return retry_strategy.make_retrying_call( 12006 self.base_client.call_api, 12007 resource_path=resource_path, 12008 method=method, 12009 path_params=path_params, 12010 query_params=query_params, 12011 header_params=header_params, 12012 response_type="JobCollection") 12013 else: 12014 return self.base_client.call_api( 12015 resource_path=resource_path, 12016 method=method, 12017 path_params=path_params, 12018 query_params=query_params, 12019 header_params=header_params, 12020 response_type="JobCollection") 12021 12022 def list_metastores(self, compartment_id, **kwargs): 12023 """ 12024 Returns a list of all metastores in the specified compartment. 12025 12026 12027 :param str compartment_id: (required) 12028 The OCID of the compartment where you want to list resources. 12029 12030 :param str display_name: (optional) 12031 A filter to return only resources that match the entire display name given. The match is not case sensitive. 12032 12033 :param int limit: (optional) 12034 The maximum number of items to return. 12035 12036 :param str page: (optional) 12037 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 12038 12039 :param str lifecycle_state: (optional) 12040 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 12041 12042 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 12043 12044 :param str sort_order: (optional) 12045 The sort order to use, either 'asc' or 'desc'. 12046 12047 Allowed values are: "ASC", "DESC" 12048 12049 :param str sort_by: (optional) 12050 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 12051 12052 Allowed values are: "TIMECREATED", "DISPLAYNAME" 12053 12054 :param str opc_request_id: (optional) 12055 The client request ID for tracing. 12056 12057 :param obj retry_strategy: (optional) 12058 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12059 12060 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 12061 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12062 12063 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12064 12065 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_catalog.models.MetastoreSummary` 12066 :rtype: :class:`~oci.response.Response` 12067 12068 :example: 12069 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_metastores.py.html>`__ to see an example of how to use list_metastores API. 12070 """ 12071 resource_path = "/metastores" 12072 method = "GET" 12073 12074 # Don't accept unknown kwargs 12075 expected_kwargs = [ 12076 "retry_strategy", 12077 "display_name", 12078 "limit", 12079 "page", 12080 "lifecycle_state", 12081 "sort_order", 12082 "sort_by", 12083 "opc_request_id" 12084 ] 12085 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12086 if extra_kwargs: 12087 raise ValueError( 12088 "list_metastores got unknown kwargs: {!r}".format(extra_kwargs)) 12089 12090 if 'lifecycle_state' in kwargs: 12091 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 12092 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 12093 raise ValueError( 12094 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 12095 ) 12096 12097 if 'sort_order' in kwargs: 12098 sort_order_allowed_values = ["ASC", "DESC"] 12099 if kwargs['sort_order'] not in sort_order_allowed_values: 12100 raise ValueError( 12101 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 12102 ) 12103 12104 if 'sort_by' in kwargs: 12105 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 12106 if kwargs['sort_by'] not in sort_by_allowed_values: 12107 raise ValueError( 12108 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 12109 ) 12110 12111 query_params = { 12112 "compartmentId": compartment_id, 12113 "displayName": kwargs.get("display_name", missing), 12114 "limit": kwargs.get("limit", missing), 12115 "page": kwargs.get("page", missing), 12116 "lifecycleState": kwargs.get("lifecycle_state", missing), 12117 "sortOrder": kwargs.get("sort_order", missing), 12118 "sortBy": kwargs.get("sort_by", missing) 12119 } 12120 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12121 12122 header_params = { 12123 "accept": "application/json", 12124 "content-type": "application/json", 12125 "opc-request-id": kwargs.get("opc_request_id", missing) 12126 } 12127 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12128 12129 retry_strategy = self.base_client.get_preferred_retry_strategy( 12130 operation_retry_strategy=kwargs.get('retry_strategy'), 12131 client_retry_strategy=self.retry_strategy 12132 ) 12133 if retry_strategy is None: 12134 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 12135 12136 if retry_strategy: 12137 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12138 self.base_client.add_opc_client_retries_header(header_params) 12139 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12140 return retry_strategy.make_retrying_call( 12141 self.base_client.call_api, 12142 resource_path=resource_path, 12143 method=method, 12144 query_params=query_params, 12145 header_params=header_params, 12146 response_type="list[MetastoreSummary]") 12147 else: 12148 return self.base_client.call_api( 12149 resource_path=resource_path, 12150 method=method, 12151 query_params=query_params, 12152 header_params=header_params, 12153 response_type="list[MetastoreSummary]") 12154 12155 def list_namespaces(self, catalog_id, **kwargs): 12156 """ 12157 Returns a list of namespaces within a data catalog. 12158 12159 12160 :param str catalog_id: (required) 12161 Unique catalog identifier. 12162 12163 :param str display_name: (optional) 12164 A filter to return only resources that match the entire display name given. The match is not case sensitive. 12165 12166 :param str display_name_contains: (optional) 12167 A filter to return only resources that match display name pattern given. The match is not case sensitive. 12168 For Example : /folders?displayNameContains=Cu.* 12169 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 12170 12171 :param str lifecycle_state: (optional) 12172 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 12173 12174 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 12175 12176 :param datetime time_created: (optional) 12177 Time that the resource was created. An `RFC3339`__ formatted datetime string. 12178 12179 __ https://tools.ietf.org/html/rfc3339 12180 12181 :param datetime time_updated: (optional) 12182 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 12183 12184 __ https://tools.ietf.org/html/rfc3339 12185 12186 :param str created_by_id: (optional) 12187 OCID of the user who created the resource. 12188 12189 :param str updated_by_id: (optional) 12190 OCID of the user who updated the resource. 12191 12192 :param str sort_by: (optional) 12193 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 12194 12195 Allowed values are: "TIMECREATED", "DISPLAYNAME" 12196 12197 :param str sort_order: (optional) 12198 The sort order to use, either 'asc' or 'desc'. 12199 12200 Allowed values are: "ASC", "DESC" 12201 12202 :param list[str] fields: (optional) 12203 Specifies the fields to return in a namespace summary response. 12204 12205 Allowed values are: "key", "displayName", "description", "lifecycleState", "timeCreated" 12206 12207 :param int limit: (optional) 12208 The maximum number of items to return. 12209 12210 :param str page: (optional) 12211 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 12212 12213 :param str opc_request_id: (optional) 12214 The client request ID for tracing. 12215 12216 :param obj retry_strategy: (optional) 12217 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12218 12219 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 12220 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12221 12222 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12223 12224 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.NamespaceCollection` 12225 :rtype: :class:`~oci.response.Response` 12226 12227 :example: 12228 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_namespaces.py.html>`__ to see an example of how to use list_namespaces API. 12229 """ 12230 resource_path = "/catalogs/{catalogId}/namespaces" 12231 method = "GET" 12232 12233 # Don't accept unknown kwargs 12234 expected_kwargs = [ 12235 "retry_strategy", 12236 "display_name", 12237 "display_name_contains", 12238 "lifecycle_state", 12239 "time_created", 12240 "time_updated", 12241 "created_by_id", 12242 "updated_by_id", 12243 "sort_by", 12244 "sort_order", 12245 "fields", 12246 "limit", 12247 "page", 12248 "opc_request_id" 12249 ] 12250 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12251 if extra_kwargs: 12252 raise ValueError( 12253 "list_namespaces got unknown kwargs: {!r}".format(extra_kwargs)) 12254 12255 path_params = { 12256 "catalogId": catalog_id 12257 } 12258 12259 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 12260 12261 for (k, v) in six.iteritems(path_params): 12262 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 12263 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 12264 12265 if 'lifecycle_state' in kwargs: 12266 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 12267 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 12268 raise ValueError( 12269 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 12270 ) 12271 12272 if 'sort_by' in kwargs: 12273 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 12274 if kwargs['sort_by'] not in sort_by_allowed_values: 12275 raise ValueError( 12276 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 12277 ) 12278 12279 if 'sort_order' in kwargs: 12280 sort_order_allowed_values = ["ASC", "DESC"] 12281 if kwargs['sort_order'] not in sort_order_allowed_values: 12282 raise ValueError( 12283 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 12284 ) 12285 12286 if 'fields' in kwargs: 12287 fields_allowed_values = ["key", "displayName", "description", "lifecycleState", "timeCreated"] 12288 for fields_item in kwargs['fields']: 12289 if fields_item not in fields_allowed_values: 12290 raise ValueError( 12291 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 12292 ) 12293 12294 query_params = { 12295 "displayName": kwargs.get("display_name", missing), 12296 "displayNameContains": kwargs.get("display_name_contains", missing), 12297 "lifecycleState": kwargs.get("lifecycle_state", missing), 12298 "timeCreated": kwargs.get("time_created", missing), 12299 "timeUpdated": kwargs.get("time_updated", missing), 12300 "createdById": kwargs.get("created_by_id", missing), 12301 "updatedById": kwargs.get("updated_by_id", missing), 12302 "sortBy": kwargs.get("sort_by", missing), 12303 "sortOrder": kwargs.get("sort_order", missing), 12304 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 12305 "limit": kwargs.get("limit", missing), 12306 "page": kwargs.get("page", missing) 12307 } 12308 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12309 12310 header_params = { 12311 "accept": "application/json", 12312 "content-type": "application/json", 12313 "opc-request-id": kwargs.get("opc_request_id", missing) 12314 } 12315 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12316 12317 retry_strategy = self.base_client.get_preferred_retry_strategy( 12318 operation_retry_strategy=kwargs.get('retry_strategy'), 12319 client_retry_strategy=self.retry_strategy 12320 ) 12321 if retry_strategy is None: 12322 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 12323 12324 if retry_strategy: 12325 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12326 self.base_client.add_opc_client_retries_header(header_params) 12327 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12328 return retry_strategy.make_retrying_call( 12329 self.base_client.call_api, 12330 resource_path=resource_path, 12331 method=method, 12332 path_params=path_params, 12333 query_params=query_params, 12334 header_params=header_params, 12335 response_type="NamespaceCollection") 12336 else: 12337 return self.base_client.call_api( 12338 resource_path=resource_path, 12339 method=method, 12340 path_params=path_params, 12341 query_params=query_params, 12342 header_params=header_params, 12343 response_type="NamespaceCollection") 12344 12345 def list_patterns(self, catalog_id, **kwargs): 12346 """ 12347 Returns a list of patterns within a data catalog. 12348 12349 12350 :param str catalog_id: (required) 12351 Unique catalog identifier. 12352 12353 :param str display_name: (optional) 12354 A filter to return only resources that match the entire display name given. The match is not case sensitive. 12355 12356 :param str display_name_contains: (optional) 12357 A filter to return only resources that match display name pattern given. The match is not case sensitive. 12358 For Example : /folders?displayNameContains=Cu.* 12359 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 12360 12361 :param str lifecycle_state: (optional) 12362 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 12363 12364 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 12365 12366 :param datetime time_created: (optional) 12367 Time that the resource was created. An `RFC3339`__ formatted datetime string. 12368 12369 __ https://tools.ietf.org/html/rfc3339 12370 12371 :param datetime time_updated: (optional) 12372 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 12373 12374 __ https://tools.ietf.org/html/rfc3339 12375 12376 :param str created_by_id: (optional) 12377 OCID of the user who created the resource. 12378 12379 :param str updated_by_id: (optional) 12380 OCID of the user who updated the resource. 12381 12382 :param list[str] fields: (optional) 12383 Specifies the fields to return in a pattern summary response. 12384 12385 Allowed values are: "key", "displayName", "description", "catalogId", "expression", "lifecycleState", "timeCreated" 12386 12387 :param str sort_by: (optional) 12388 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 12389 12390 Allowed values are: "TIMECREATED", "DISPLAYNAME" 12391 12392 :param str sort_order: (optional) 12393 The sort order to use, either 'asc' or 'desc'. 12394 12395 Allowed values are: "ASC", "DESC" 12396 12397 :param int limit: (optional) 12398 The maximum number of items to return. 12399 12400 :param str page: (optional) 12401 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 12402 12403 :param str opc_request_id: (optional) 12404 The client request ID for tracing. 12405 12406 :param obj retry_strategy: (optional) 12407 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12408 12409 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 12410 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12411 12412 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12413 12414 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.PatternCollection` 12415 :rtype: :class:`~oci.response.Response` 12416 12417 :example: 12418 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_patterns.py.html>`__ to see an example of how to use list_patterns API. 12419 """ 12420 resource_path = "/catalogs/{catalogId}/patterns" 12421 method = "GET" 12422 12423 # Don't accept unknown kwargs 12424 expected_kwargs = [ 12425 "retry_strategy", 12426 "display_name", 12427 "display_name_contains", 12428 "lifecycle_state", 12429 "time_created", 12430 "time_updated", 12431 "created_by_id", 12432 "updated_by_id", 12433 "fields", 12434 "sort_by", 12435 "sort_order", 12436 "limit", 12437 "page", 12438 "opc_request_id" 12439 ] 12440 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12441 if extra_kwargs: 12442 raise ValueError( 12443 "list_patterns got unknown kwargs: {!r}".format(extra_kwargs)) 12444 12445 path_params = { 12446 "catalogId": catalog_id 12447 } 12448 12449 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 12450 12451 for (k, v) in six.iteritems(path_params): 12452 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 12453 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 12454 12455 if 'lifecycle_state' in kwargs: 12456 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 12457 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 12458 raise ValueError( 12459 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 12460 ) 12461 12462 if 'fields' in kwargs: 12463 fields_allowed_values = ["key", "displayName", "description", "catalogId", "expression", "lifecycleState", "timeCreated"] 12464 for fields_item in kwargs['fields']: 12465 if fields_item not in fields_allowed_values: 12466 raise ValueError( 12467 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 12468 ) 12469 12470 if 'sort_by' in kwargs: 12471 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 12472 if kwargs['sort_by'] not in sort_by_allowed_values: 12473 raise ValueError( 12474 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 12475 ) 12476 12477 if 'sort_order' in kwargs: 12478 sort_order_allowed_values = ["ASC", "DESC"] 12479 if kwargs['sort_order'] not in sort_order_allowed_values: 12480 raise ValueError( 12481 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 12482 ) 12483 12484 query_params = { 12485 "displayName": kwargs.get("display_name", missing), 12486 "displayNameContains": kwargs.get("display_name_contains", missing), 12487 "lifecycleState": kwargs.get("lifecycle_state", missing), 12488 "timeCreated": kwargs.get("time_created", missing), 12489 "timeUpdated": kwargs.get("time_updated", missing), 12490 "createdById": kwargs.get("created_by_id", missing), 12491 "updatedById": kwargs.get("updated_by_id", missing), 12492 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 12493 "sortBy": kwargs.get("sort_by", missing), 12494 "sortOrder": kwargs.get("sort_order", missing), 12495 "limit": kwargs.get("limit", missing), 12496 "page": kwargs.get("page", missing) 12497 } 12498 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12499 12500 header_params = { 12501 "accept": "application/json", 12502 "content-type": "application/json", 12503 "opc-request-id": kwargs.get("opc_request_id", missing) 12504 } 12505 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12506 12507 retry_strategy = self.base_client.get_preferred_retry_strategy( 12508 operation_retry_strategy=kwargs.get('retry_strategy'), 12509 client_retry_strategy=self.retry_strategy 12510 ) 12511 if retry_strategy is None: 12512 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 12513 12514 if retry_strategy: 12515 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12516 self.base_client.add_opc_client_retries_header(header_params) 12517 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12518 return retry_strategy.make_retrying_call( 12519 self.base_client.call_api, 12520 resource_path=resource_path, 12521 method=method, 12522 path_params=path_params, 12523 query_params=query_params, 12524 header_params=header_params, 12525 response_type="PatternCollection") 12526 else: 12527 return self.base_client.call_api( 12528 resource_path=resource_path, 12529 method=method, 12530 path_params=path_params, 12531 query_params=query_params, 12532 header_params=header_params, 12533 response_type="PatternCollection") 12534 12535 def list_rules(self, catalog_id, data_asset_key, entity_key, **kwargs): 12536 """ 12537 Returns a list of all rules of a data entity. 12538 12539 12540 :param str catalog_id: (required) 12541 Unique catalog identifier. 12542 12543 :param str data_asset_key: (required) 12544 Unique data asset key. 12545 12546 :param str entity_key: (required) 12547 Unique entity key. 12548 12549 :param str display_name: (optional) 12550 A filter to return only resources that match the entire display name given. The match is not case sensitive. 12551 12552 :param str display_name_contains: (optional) 12553 A filter to return only resources that match display name pattern given. The match is not case sensitive. 12554 For Example : /folders?displayNameContains=Cu.* 12555 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 12556 12557 :param str rule_type: (optional) 12558 Rule type used to filter the response to a list rules call. 12559 12560 Allowed values are: "PRIMARYKEY", "FOREIGNKEY", "UNIQUEKEY" 12561 12562 :param str lifecycle_state: (optional) 12563 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 12564 12565 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 12566 12567 :param str origin_type: (optional) 12568 Rule origin type used to filter the response to a list rules call. 12569 12570 Allowed values are: "SOURCE", "USER", "PROFILING" 12571 12572 :param str external_key: (optional) 12573 Unique external identifier of this resource in the external source system. 12574 12575 :param datetime time_created: (optional) 12576 Time that the resource was created. An `RFC3339`__ formatted datetime string. 12577 12578 __ https://tools.ietf.org/html/rfc3339 12579 12580 :param datetime time_updated: (optional) 12581 Time that the resource was updated. An `RFC3339`__ formatted datetime string. 12582 12583 __ https://tools.ietf.org/html/rfc3339 12584 12585 :param str created_by_id: (optional) 12586 OCID of the user who created the resource. 12587 12588 :param str updated_by_id: (optional) 12589 OCID of the user who updated the resource. 12590 12591 :param list[str] fields: (optional) 12592 Specifies the fields to return in a rule summary response. 12593 12594 Allowed values are: "key", "displayName", "ruleType", "externalKey", "referencedFolderKey", "referencedFolderName", "referencedEntityKey", "referencedEntityName", "referencedRuleKey", "referencedRuleName", "originType", "lifecycleState", "timeCreated", "uri" 12595 12596 :param str sort_by: (optional) 12597 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 12598 12599 Allowed values are: "TIMECREATED", "DISPLAYNAME" 12600 12601 :param str sort_order: (optional) 12602 The sort order to use, either 'asc' or 'desc'. 12603 12604 Allowed values are: "ASC", "DESC" 12605 12606 :param int limit: (optional) 12607 The maximum number of items to return. 12608 12609 :param str page: (optional) 12610 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 12611 12612 :param str opc_request_id: (optional) 12613 The client request ID for tracing. 12614 12615 :param obj retry_strategy: (optional) 12616 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12617 12618 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 12619 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12620 12621 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12622 12623 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.RuleCollection` 12624 :rtype: :class:`~oci.response.Response` 12625 12626 :example: 12627 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_rules.py.html>`__ to see an example of how to use list_rules API. 12628 """ 12629 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/rules" 12630 method = "GET" 12631 12632 # Don't accept unknown kwargs 12633 expected_kwargs = [ 12634 "retry_strategy", 12635 "display_name", 12636 "display_name_contains", 12637 "rule_type", 12638 "lifecycle_state", 12639 "origin_type", 12640 "external_key", 12641 "time_created", 12642 "time_updated", 12643 "created_by_id", 12644 "updated_by_id", 12645 "fields", 12646 "sort_by", 12647 "sort_order", 12648 "limit", 12649 "page", 12650 "opc_request_id" 12651 ] 12652 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12653 if extra_kwargs: 12654 raise ValueError( 12655 "list_rules got unknown kwargs: {!r}".format(extra_kwargs)) 12656 12657 path_params = { 12658 "catalogId": catalog_id, 12659 "dataAssetKey": data_asset_key, 12660 "entityKey": entity_key 12661 } 12662 12663 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 12664 12665 for (k, v) in six.iteritems(path_params): 12666 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 12667 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 12668 12669 if 'rule_type' in kwargs: 12670 rule_type_allowed_values = ["PRIMARYKEY", "FOREIGNKEY", "UNIQUEKEY"] 12671 if kwargs['rule_type'] not in rule_type_allowed_values: 12672 raise ValueError( 12673 "Invalid value for `rule_type`, must be one of {0}".format(rule_type_allowed_values) 12674 ) 12675 12676 if 'lifecycle_state' in kwargs: 12677 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 12678 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 12679 raise ValueError( 12680 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 12681 ) 12682 12683 if 'origin_type' in kwargs: 12684 origin_type_allowed_values = ["SOURCE", "USER", "PROFILING"] 12685 if kwargs['origin_type'] not in origin_type_allowed_values: 12686 raise ValueError( 12687 "Invalid value for `origin_type`, must be one of {0}".format(origin_type_allowed_values) 12688 ) 12689 12690 if 'fields' in kwargs: 12691 fields_allowed_values = ["key", "displayName", "ruleType", "externalKey", "referencedFolderKey", "referencedFolderName", "referencedEntityKey", "referencedEntityName", "referencedRuleKey", "referencedRuleName", "originType", "lifecycleState", "timeCreated", "uri"] 12692 for fields_item in kwargs['fields']: 12693 if fields_item not in fields_allowed_values: 12694 raise ValueError( 12695 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 12696 ) 12697 12698 if 'sort_by' in kwargs: 12699 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 12700 if kwargs['sort_by'] not in sort_by_allowed_values: 12701 raise ValueError( 12702 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 12703 ) 12704 12705 if 'sort_order' in kwargs: 12706 sort_order_allowed_values = ["ASC", "DESC"] 12707 if kwargs['sort_order'] not in sort_order_allowed_values: 12708 raise ValueError( 12709 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 12710 ) 12711 12712 query_params = { 12713 "displayName": kwargs.get("display_name", missing), 12714 "displayNameContains": kwargs.get("display_name_contains", missing), 12715 "ruleType": kwargs.get("rule_type", missing), 12716 "lifecycleState": kwargs.get("lifecycle_state", missing), 12717 "originType": kwargs.get("origin_type", missing), 12718 "externalKey": kwargs.get("external_key", missing), 12719 "timeCreated": kwargs.get("time_created", missing), 12720 "timeUpdated": kwargs.get("time_updated", missing), 12721 "createdById": kwargs.get("created_by_id", missing), 12722 "updatedById": kwargs.get("updated_by_id", missing), 12723 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 12724 "sortBy": kwargs.get("sort_by", missing), 12725 "sortOrder": kwargs.get("sort_order", missing), 12726 "limit": kwargs.get("limit", missing), 12727 "page": kwargs.get("page", missing) 12728 } 12729 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12730 12731 header_params = { 12732 "accept": "application/json", 12733 "content-type": "application/json", 12734 "opc-request-id": kwargs.get("opc_request_id", missing) 12735 } 12736 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12737 12738 retry_strategy = self.base_client.get_preferred_retry_strategy( 12739 operation_retry_strategy=kwargs.get('retry_strategy'), 12740 client_retry_strategy=self.retry_strategy 12741 ) 12742 if retry_strategy is None: 12743 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 12744 12745 if retry_strategy: 12746 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12747 self.base_client.add_opc_client_retries_header(header_params) 12748 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12749 return retry_strategy.make_retrying_call( 12750 self.base_client.call_api, 12751 resource_path=resource_path, 12752 method=method, 12753 path_params=path_params, 12754 query_params=query_params, 12755 header_params=header_params, 12756 response_type="RuleCollection") 12757 else: 12758 return self.base_client.call_api( 12759 resource_path=resource_path, 12760 method=method, 12761 path_params=path_params, 12762 query_params=query_params, 12763 header_params=header_params, 12764 response_type="RuleCollection") 12765 12766 def list_tags(self, catalog_id, **kwargs): 12767 """ 12768 Returns a list of all user created tags in the system. 12769 12770 12771 :param str catalog_id: (required) 12772 Unique catalog identifier. 12773 12774 :param str display_name: (optional) 12775 A filter to return only resources that match the entire display name given. The match is not case sensitive. 12776 12777 :param str display_name_contains: (optional) 12778 A filter to return only resources that match display name pattern given. The match is not case sensitive. 12779 For Example : /folders?displayNameContains=Cu.* 12780 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 12781 12782 :param str lifecycle_state: (optional) 12783 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 12784 12785 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 12786 12787 :param list[str] fields: (optional) 12788 Specifies the fields to return in a term summary response. 12789 12790 Allowed values are: "key", "displayName", "description", "glossaryKey", "parentTermKey", "isAllowedToHaveChildTerms", "path", "lifecycleState", "timeCreated", "workflowStatus", "associatedObjectCount", "uri" 12791 12792 :param str sort_by: (optional) 12793 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 12794 12795 Allowed values are: "TIMECREATED", "DISPLAYNAME" 12796 12797 :param str sort_order: (optional) 12798 The sort order to use, either 'asc' or 'desc'. 12799 12800 Allowed values are: "ASC", "DESC" 12801 12802 :param int limit: (optional) 12803 The maximum number of items to return. 12804 12805 :param str page: (optional) 12806 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 12807 12808 :param str opc_request_id: (optional) 12809 The client request ID for tracing. 12810 12811 :param obj retry_strategy: (optional) 12812 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12813 12814 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 12815 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12816 12817 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12818 12819 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.TermCollection` 12820 :rtype: :class:`~oci.response.Response` 12821 12822 :example: 12823 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_tags.py.html>`__ to see an example of how to use list_tags API. 12824 """ 12825 resource_path = "/catalogs/{catalogId}/tags" 12826 method = "GET" 12827 12828 # Don't accept unknown kwargs 12829 expected_kwargs = [ 12830 "retry_strategy", 12831 "display_name", 12832 "display_name_contains", 12833 "lifecycle_state", 12834 "fields", 12835 "sort_by", 12836 "sort_order", 12837 "limit", 12838 "page", 12839 "opc_request_id" 12840 ] 12841 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 12842 if extra_kwargs: 12843 raise ValueError( 12844 "list_tags got unknown kwargs: {!r}".format(extra_kwargs)) 12845 12846 path_params = { 12847 "catalogId": catalog_id 12848 } 12849 12850 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 12851 12852 for (k, v) in six.iteritems(path_params): 12853 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 12854 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 12855 12856 if 'lifecycle_state' in kwargs: 12857 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 12858 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 12859 raise ValueError( 12860 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 12861 ) 12862 12863 if 'fields' in kwargs: 12864 fields_allowed_values = ["key", "displayName", "description", "glossaryKey", "parentTermKey", "isAllowedToHaveChildTerms", "path", "lifecycleState", "timeCreated", "workflowStatus", "associatedObjectCount", "uri"] 12865 for fields_item in kwargs['fields']: 12866 if fields_item not in fields_allowed_values: 12867 raise ValueError( 12868 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 12869 ) 12870 12871 if 'sort_by' in kwargs: 12872 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 12873 if kwargs['sort_by'] not in sort_by_allowed_values: 12874 raise ValueError( 12875 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 12876 ) 12877 12878 if 'sort_order' in kwargs: 12879 sort_order_allowed_values = ["ASC", "DESC"] 12880 if kwargs['sort_order'] not in sort_order_allowed_values: 12881 raise ValueError( 12882 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 12883 ) 12884 12885 query_params = { 12886 "displayName": kwargs.get("display_name", missing), 12887 "displayNameContains": kwargs.get("display_name_contains", missing), 12888 "lifecycleState": kwargs.get("lifecycle_state", missing), 12889 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 12890 "sortBy": kwargs.get("sort_by", missing), 12891 "sortOrder": kwargs.get("sort_order", missing), 12892 "limit": kwargs.get("limit", missing), 12893 "page": kwargs.get("page", missing) 12894 } 12895 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 12896 12897 header_params = { 12898 "accept": "application/json", 12899 "content-type": "application/json", 12900 "opc-request-id": kwargs.get("opc_request_id", missing) 12901 } 12902 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 12903 12904 retry_strategy = self.base_client.get_preferred_retry_strategy( 12905 operation_retry_strategy=kwargs.get('retry_strategy'), 12906 client_retry_strategy=self.retry_strategy 12907 ) 12908 if retry_strategy is None: 12909 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 12910 12911 if retry_strategy: 12912 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 12913 self.base_client.add_opc_client_retries_header(header_params) 12914 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 12915 return retry_strategy.make_retrying_call( 12916 self.base_client.call_api, 12917 resource_path=resource_path, 12918 method=method, 12919 path_params=path_params, 12920 query_params=query_params, 12921 header_params=header_params, 12922 response_type="TermCollection") 12923 else: 12924 return self.base_client.call_api( 12925 resource_path=resource_path, 12926 method=method, 12927 path_params=path_params, 12928 query_params=query_params, 12929 header_params=header_params, 12930 response_type="TermCollection") 12931 12932 def list_term_relationships(self, catalog_id, glossary_key, term_key, **kwargs): 12933 """ 12934 Returns a list of all term relationships within a glossary. 12935 12936 12937 :param str catalog_id: (required) 12938 Unique catalog identifier. 12939 12940 :param str glossary_key: (required) 12941 Unique glossary key. 12942 12943 :param str term_key: (required) 12944 Unique glossary term key. 12945 12946 :param str display_name: (optional) 12947 A filter to return only resources that match the entire display name given. The match is not case sensitive. 12948 12949 :param str display_name_contains: (optional) 12950 A filter to return only resources that match display name pattern given. The match is not case sensitive. 12951 For Example : /folders?displayNameContains=Cu.* 12952 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 12953 12954 :param str lifecycle_state: (optional) 12955 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 12956 12957 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 12958 12959 :param list[str] fields: (optional) 12960 Specifies the fields to return in a term relationship summary response. 12961 12962 Allowed values are: "key", "displayName", "description", "relatedTermKey", "relatedTermDisplayName", "parentTermKey", "parentTermDisplayName", "lifecycleState", "timeCreated", "uri" 12963 12964 :param str sort_by: (optional) 12965 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 12966 12967 Allowed values are: "TIMECREATED", "DISPLAYNAME" 12968 12969 :param str sort_order: (optional) 12970 The sort order to use, either 'asc' or 'desc'. 12971 12972 Allowed values are: "ASC", "DESC" 12973 12974 :param int limit: (optional) 12975 The maximum number of items to return. 12976 12977 :param str page: (optional) 12978 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 12979 12980 :param str opc_request_id: (optional) 12981 The client request ID for tracing. 12982 12983 :param obj retry_strategy: (optional) 12984 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 12985 12986 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 12987 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 12988 12989 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 12990 12991 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.TermRelationshipCollection` 12992 :rtype: :class:`~oci.response.Response` 12993 12994 :example: 12995 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_term_relationships.py.html>`__ to see an example of how to use list_term_relationships API. 12996 """ 12997 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms/{termKey}/termRelationships" 12998 method = "GET" 12999 13000 # Don't accept unknown kwargs 13001 expected_kwargs = [ 13002 "retry_strategy", 13003 "display_name", 13004 "display_name_contains", 13005 "lifecycle_state", 13006 "fields", 13007 "sort_by", 13008 "sort_order", 13009 "limit", 13010 "page", 13011 "opc_request_id" 13012 ] 13013 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13014 if extra_kwargs: 13015 raise ValueError( 13016 "list_term_relationships got unknown kwargs: {!r}".format(extra_kwargs)) 13017 13018 path_params = { 13019 "catalogId": catalog_id, 13020 "glossaryKey": glossary_key, 13021 "termKey": term_key 13022 } 13023 13024 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 13025 13026 for (k, v) in six.iteritems(path_params): 13027 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 13028 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 13029 13030 if 'lifecycle_state' in kwargs: 13031 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 13032 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 13033 raise ValueError( 13034 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 13035 ) 13036 13037 if 'fields' in kwargs: 13038 fields_allowed_values = ["key", "displayName", "description", "relatedTermKey", "relatedTermDisplayName", "parentTermKey", "parentTermDisplayName", "lifecycleState", "timeCreated", "uri"] 13039 for fields_item in kwargs['fields']: 13040 if fields_item not in fields_allowed_values: 13041 raise ValueError( 13042 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 13043 ) 13044 13045 if 'sort_by' in kwargs: 13046 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 13047 if kwargs['sort_by'] not in sort_by_allowed_values: 13048 raise ValueError( 13049 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13050 ) 13051 13052 if 'sort_order' in kwargs: 13053 sort_order_allowed_values = ["ASC", "DESC"] 13054 if kwargs['sort_order'] not in sort_order_allowed_values: 13055 raise ValueError( 13056 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13057 ) 13058 13059 query_params = { 13060 "displayName": kwargs.get("display_name", missing), 13061 "displayNameContains": kwargs.get("display_name_contains", missing), 13062 "lifecycleState": kwargs.get("lifecycle_state", missing), 13063 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 13064 "sortBy": kwargs.get("sort_by", missing), 13065 "sortOrder": kwargs.get("sort_order", missing), 13066 "limit": kwargs.get("limit", missing), 13067 "page": kwargs.get("page", missing) 13068 } 13069 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13070 13071 header_params = { 13072 "accept": "application/json", 13073 "content-type": "application/json", 13074 "opc-request-id": kwargs.get("opc_request_id", missing) 13075 } 13076 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 13077 13078 retry_strategy = self.base_client.get_preferred_retry_strategy( 13079 operation_retry_strategy=kwargs.get('retry_strategy'), 13080 client_retry_strategy=self.retry_strategy 13081 ) 13082 if retry_strategy is None: 13083 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 13084 13085 if retry_strategy: 13086 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13087 self.base_client.add_opc_client_retries_header(header_params) 13088 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13089 return retry_strategy.make_retrying_call( 13090 self.base_client.call_api, 13091 resource_path=resource_path, 13092 method=method, 13093 path_params=path_params, 13094 query_params=query_params, 13095 header_params=header_params, 13096 response_type="TermRelationshipCollection") 13097 else: 13098 return self.base_client.call_api( 13099 resource_path=resource_path, 13100 method=method, 13101 path_params=path_params, 13102 query_params=query_params, 13103 header_params=header_params, 13104 response_type="TermRelationshipCollection") 13105 13106 def list_terms(self, catalog_id, glossary_key, **kwargs): 13107 """ 13108 Returns a list of all terms within a glossary. 13109 13110 13111 :param str catalog_id: (required) 13112 Unique catalog identifier. 13113 13114 :param str glossary_key: (required) 13115 Unique glossary key. 13116 13117 :param str display_name: (optional) 13118 A filter to return only resources that match the entire display name given. The match is not case sensitive. 13119 13120 :param str display_name_contains: (optional) 13121 A filter to return only resources that match display name pattern given. The match is not case sensitive. 13122 For Example : /folders?displayNameContains=Cu.* 13123 The above would match all folders with display name that starts with \"Cu\" or has the pattern \"Cu\" anywhere in between. 13124 13125 :param str lifecycle_state: (optional) 13126 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 13127 13128 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 13129 13130 :param str parent_term_key: (optional) 13131 Unique key of the parent term. 13132 13133 :param bool is_allowed_to_have_child_terms: (optional) 13134 Indicates whether a term may contain child terms. 13135 13136 :param str workflow_status: (optional) 13137 Status of the approval workflow for this business term in the glossary. 13138 13139 Allowed values are: "NEW", "APPROVED", "UNDER_REVIEW", "ESCALATED" 13140 13141 :param str path: (optional) 13142 Full path of the resource for resources that support paths. 13143 13144 :param list[str] fields: (optional) 13145 Specifies the fields to return in a term summary response. 13146 13147 Allowed values are: "key", "displayName", "description", "glossaryKey", "parentTermKey", "isAllowedToHaveChildTerms", "path", "lifecycleState", "timeCreated", "workflowStatus", "associatedObjectCount", "uri" 13148 13149 :param str sort_by: (optional) 13150 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 13151 13152 Allowed values are: "TIMECREATED", "DISPLAYNAME" 13153 13154 :param str sort_order: (optional) 13155 The sort order to use, either 'asc' or 'desc'. 13156 13157 Allowed values are: "ASC", "DESC" 13158 13159 :param int limit: (optional) 13160 The maximum number of items to return. 13161 13162 :param str page: (optional) 13163 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 13164 13165 :param str opc_request_id: (optional) 13166 The client request ID for tracing. 13167 13168 :param obj retry_strategy: (optional) 13169 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13170 13171 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 13172 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13173 13174 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13175 13176 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.TermCollection` 13177 :rtype: :class:`~oci.response.Response` 13178 13179 :example: 13180 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_terms.py.html>`__ to see an example of how to use list_terms API. 13181 """ 13182 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms" 13183 method = "GET" 13184 13185 # Don't accept unknown kwargs 13186 expected_kwargs = [ 13187 "retry_strategy", 13188 "display_name", 13189 "display_name_contains", 13190 "lifecycle_state", 13191 "parent_term_key", 13192 "is_allowed_to_have_child_terms", 13193 "workflow_status", 13194 "path", 13195 "fields", 13196 "sort_by", 13197 "sort_order", 13198 "limit", 13199 "page", 13200 "opc_request_id" 13201 ] 13202 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13203 if extra_kwargs: 13204 raise ValueError( 13205 "list_terms got unknown kwargs: {!r}".format(extra_kwargs)) 13206 13207 path_params = { 13208 "catalogId": catalog_id, 13209 "glossaryKey": glossary_key 13210 } 13211 13212 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 13213 13214 for (k, v) in six.iteritems(path_params): 13215 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 13216 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 13217 13218 if 'lifecycle_state' in kwargs: 13219 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 13220 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 13221 raise ValueError( 13222 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 13223 ) 13224 13225 if 'workflow_status' in kwargs: 13226 workflow_status_allowed_values = ["NEW", "APPROVED", "UNDER_REVIEW", "ESCALATED"] 13227 if kwargs['workflow_status'] not in workflow_status_allowed_values: 13228 raise ValueError( 13229 "Invalid value for `workflow_status`, must be one of {0}".format(workflow_status_allowed_values) 13230 ) 13231 13232 if 'fields' in kwargs: 13233 fields_allowed_values = ["key", "displayName", "description", "glossaryKey", "parentTermKey", "isAllowedToHaveChildTerms", "path", "lifecycleState", "timeCreated", "workflowStatus", "associatedObjectCount", "uri"] 13234 for fields_item in kwargs['fields']: 13235 if fields_item not in fields_allowed_values: 13236 raise ValueError( 13237 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 13238 ) 13239 13240 if 'sort_by' in kwargs: 13241 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 13242 if kwargs['sort_by'] not in sort_by_allowed_values: 13243 raise ValueError( 13244 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13245 ) 13246 13247 if 'sort_order' in kwargs: 13248 sort_order_allowed_values = ["ASC", "DESC"] 13249 if kwargs['sort_order'] not in sort_order_allowed_values: 13250 raise ValueError( 13251 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13252 ) 13253 13254 query_params = { 13255 "displayName": kwargs.get("display_name", missing), 13256 "displayNameContains": kwargs.get("display_name_contains", missing), 13257 "lifecycleState": kwargs.get("lifecycle_state", missing), 13258 "parentTermKey": kwargs.get("parent_term_key", missing), 13259 "isAllowedToHaveChildTerms": kwargs.get("is_allowed_to_have_child_terms", missing), 13260 "workflowStatus": kwargs.get("workflow_status", missing), 13261 "path": kwargs.get("path", missing), 13262 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 13263 "sortBy": kwargs.get("sort_by", missing), 13264 "sortOrder": kwargs.get("sort_order", missing), 13265 "limit": kwargs.get("limit", missing), 13266 "page": kwargs.get("page", missing) 13267 } 13268 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13269 13270 header_params = { 13271 "accept": "application/json", 13272 "content-type": "application/json", 13273 "opc-request-id": kwargs.get("opc_request_id", missing) 13274 } 13275 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 13276 13277 retry_strategy = self.base_client.get_preferred_retry_strategy( 13278 operation_retry_strategy=kwargs.get('retry_strategy'), 13279 client_retry_strategy=self.retry_strategy 13280 ) 13281 if retry_strategy is None: 13282 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 13283 13284 if retry_strategy: 13285 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13286 self.base_client.add_opc_client_retries_header(header_params) 13287 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13288 return retry_strategy.make_retrying_call( 13289 self.base_client.call_api, 13290 resource_path=resource_path, 13291 method=method, 13292 path_params=path_params, 13293 query_params=query_params, 13294 header_params=header_params, 13295 response_type="TermCollection") 13296 else: 13297 return self.base_client.call_api( 13298 resource_path=resource_path, 13299 method=method, 13300 path_params=path_params, 13301 query_params=query_params, 13302 header_params=header_params, 13303 response_type="TermCollection") 13304 13305 def list_types(self, catalog_id, **kwargs): 13306 """ 13307 Returns a list of all types within a data catalog. 13308 13309 13310 :param str catalog_id: (required) 13311 Unique catalog identifier. 13312 13313 :param str name: (optional) 13314 Immutable resource name. 13315 13316 :param str lifecycle_state: (optional) 13317 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 13318 13319 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 13320 13321 :param str is_internal: (optional) 13322 Indicates whether the type is internal, making it unavailable for use by metadata elements. 13323 13324 :param str is_tag: (optional) 13325 Indicates whether the type can be used for tagging metadata elements. 13326 13327 :param str is_approved: (optional) 13328 Indicates whether the type is approved for use as a classifying object. 13329 13330 :param str external_type_name: (optional) 13331 Data type as defined in an external system. 13332 13333 :param str type_category: (optional) 13334 Indicates the category of this type . For example, data assets or connections. 13335 13336 :param list[str] fields: (optional) 13337 Specifies the fields to return in a type summary response. 13338 13339 Allowed values are: "key", "description", "name", "catalogId", "lifecycleState", "typeCategory", "uri" 13340 13341 :param str sort_by: (optional) 13342 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 13343 13344 Allowed values are: "TIMECREATED", "DISPLAYNAME" 13345 13346 :param str sort_order: (optional) 13347 The sort order to use, either 'asc' or 'desc'. 13348 13349 Allowed values are: "ASC", "DESC" 13350 13351 :param int limit: (optional) 13352 The maximum number of items to return. 13353 13354 :param str page: (optional) 13355 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 13356 13357 :param str opc_request_id: (optional) 13358 The client request ID for tracing. 13359 13360 :param obj retry_strategy: (optional) 13361 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13362 13363 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 13364 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13365 13366 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13367 13368 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.TypeCollection` 13369 :rtype: :class:`~oci.response.Response` 13370 13371 :example: 13372 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_types.py.html>`__ to see an example of how to use list_types API. 13373 """ 13374 resource_path = "/catalogs/{catalogId}/types" 13375 method = "GET" 13376 13377 # Don't accept unknown kwargs 13378 expected_kwargs = [ 13379 "retry_strategy", 13380 "name", 13381 "lifecycle_state", 13382 "is_internal", 13383 "is_tag", 13384 "is_approved", 13385 "external_type_name", 13386 "type_category", 13387 "fields", 13388 "sort_by", 13389 "sort_order", 13390 "limit", 13391 "page", 13392 "opc_request_id" 13393 ] 13394 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13395 if extra_kwargs: 13396 raise ValueError( 13397 "list_types got unknown kwargs: {!r}".format(extra_kwargs)) 13398 13399 path_params = { 13400 "catalogId": catalog_id 13401 } 13402 13403 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 13404 13405 for (k, v) in six.iteritems(path_params): 13406 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 13407 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 13408 13409 if 'lifecycle_state' in kwargs: 13410 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 13411 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 13412 raise ValueError( 13413 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 13414 ) 13415 13416 if 'fields' in kwargs: 13417 fields_allowed_values = ["key", "description", "name", "catalogId", "lifecycleState", "typeCategory", "uri"] 13418 for fields_item in kwargs['fields']: 13419 if fields_item not in fields_allowed_values: 13420 raise ValueError( 13421 "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) 13422 ) 13423 13424 if 'sort_by' in kwargs: 13425 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 13426 if kwargs['sort_by'] not in sort_by_allowed_values: 13427 raise ValueError( 13428 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13429 ) 13430 13431 if 'sort_order' in kwargs: 13432 sort_order_allowed_values = ["ASC", "DESC"] 13433 if kwargs['sort_order'] not in sort_order_allowed_values: 13434 raise ValueError( 13435 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13436 ) 13437 13438 query_params = { 13439 "name": kwargs.get("name", missing), 13440 "lifecycleState": kwargs.get("lifecycle_state", missing), 13441 "isInternal": kwargs.get("is_internal", missing), 13442 "isTag": kwargs.get("is_tag", missing), 13443 "isApproved": kwargs.get("is_approved", missing), 13444 "externalTypeName": kwargs.get("external_type_name", missing), 13445 "typeCategory": kwargs.get("type_category", missing), 13446 "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), 13447 "sortBy": kwargs.get("sort_by", missing), 13448 "sortOrder": kwargs.get("sort_order", missing), 13449 "limit": kwargs.get("limit", missing), 13450 "page": kwargs.get("page", missing) 13451 } 13452 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13453 13454 header_params = { 13455 "accept": "application/json", 13456 "content-type": "application/json", 13457 "opc-request-id": kwargs.get("opc_request_id", missing) 13458 } 13459 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 13460 13461 retry_strategy = self.base_client.get_preferred_retry_strategy( 13462 operation_retry_strategy=kwargs.get('retry_strategy'), 13463 client_retry_strategy=self.retry_strategy 13464 ) 13465 if retry_strategy is None: 13466 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 13467 13468 if retry_strategy: 13469 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13470 self.base_client.add_opc_client_retries_header(header_params) 13471 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13472 return retry_strategy.make_retrying_call( 13473 self.base_client.call_api, 13474 resource_path=resource_path, 13475 method=method, 13476 path_params=path_params, 13477 query_params=query_params, 13478 header_params=header_params, 13479 response_type="TypeCollection") 13480 else: 13481 return self.base_client.call_api( 13482 resource_path=resource_path, 13483 method=method, 13484 path_params=path_params, 13485 query_params=query_params, 13486 header_params=header_params, 13487 response_type="TypeCollection") 13488 13489 def list_work_request_errors(self, work_request_id, **kwargs): 13490 """ 13491 Returns a (paginated) list of errors for a given work request. 13492 13493 13494 :param str work_request_id: (required) 13495 The OCID of the asynchronous request. 13496 13497 :param str opc_request_id: (optional) 13498 The client request ID for tracing. 13499 13500 :param str page: (optional) 13501 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 13502 13503 :param int limit: (optional) 13504 The maximum number of items to return. 13505 13506 :param str sort_by: (optional) 13507 The field to sort by. Only one sort order may be provided. Default order for TIMESTAMP is descending. Default order for CODE and MESSAGE is ascending. If no value is specified TIMESTAMP is default. 13508 13509 Allowed values are: "CODE", "TIMESTAMP" 13510 13511 :param str sort_order: (optional) 13512 The sort order to use, either 'asc' or 'desc'. 13513 13514 Allowed values are: "ASC", "DESC" 13515 13516 :param obj retry_strategy: (optional) 13517 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13518 13519 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 13520 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13521 13522 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13523 13524 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_catalog.models.WorkRequestError` 13525 :rtype: :class:`~oci.response.Response` 13526 13527 :example: 13528 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_work_request_errors.py.html>`__ to see an example of how to use list_work_request_errors API. 13529 """ 13530 resource_path = "/workRequests/{workRequestId}/errors" 13531 method = "GET" 13532 13533 # Don't accept unknown kwargs 13534 expected_kwargs = [ 13535 "retry_strategy", 13536 "opc_request_id", 13537 "page", 13538 "limit", 13539 "sort_by", 13540 "sort_order" 13541 ] 13542 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13543 if extra_kwargs: 13544 raise ValueError( 13545 "list_work_request_errors got unknown kwargs: {!r}".format(extra_kwargs)) 13546 13547 path_params = { 13548 "workRequestId": work_request_id 13549 } 13550 13551 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 13552 13553 for (k, v) in six.iteritems(path_params): 13554 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 13555 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 13556 13557 if 'sort_by' in kwargs: 13558 sort_by_allowed_values = ["CODE", "TIMESTAMP"] 13559 if kwargs['sort_by'] not in sort_by_allowed_values: 13560 raise ValueError( 13561 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13562 ) 13563 13564 if 'sort_order' in kwargs: 13565 sort_order_allowed_values = ["ASC", "DESC"] 13566 if kwargs['sort_order'] not in sort_order_allowed_values: 13567 raise ValueError( 13568 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13569 ) 13570 13571 query_params = { 13572 "page": kwargs.get("page", missing), 13573 "limit": kwargs.get("limit", missing), 13574 "sortBy": kwargs.get("sort_by", missing), 13575 "sortOrder": kwargs.get("sort_order", missing) 13576 } 13577 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13578 13579 header_params = { 13580 "accept": "application/json", 13581 "content-type": "application/json", 13582 "opc-request-id": kwargs.get("opc_request_id", missing) 13583 } 13584 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 13585 13586 retry_strategy = self.base_client.get_preferred_retry_strategy( 13587 operation_retry_strategy=kwargs.get('retry_strategy'), 13588 client_retry_strategy=self.retry_strategy 13589 ) 13590 if retry_strategy is None: 13591 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 13592 13593 if retry_strategy: 13594 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13595 self.base_client.add_opc_client_retries_header(header_params) 13596 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13597 return retry_strategy.make_retrying_call( 13598 self.base_client.call_api, 13599 resource_path=resource_path, 13600 method=method, 13601 path_params=path_params, 13602 query_params=query_params, 13603 header_params=header_params, 13604 response_type="list[WorkRequestError]") 13605 else: 13606 return self.base_client.call_api( 13607 resource_path=resource_path, 13608 method=method, 13609 path_params=path_params, 13610 query_params=query_params, 13611 header_params=header_params, 13612 response_type="list[WorkRequestError]") 13613 13614 def list_work_request_logs(self, work_request_id, **kwargs): 13615 """ 13616 Returns a (paginated) list of logs for a given work request. 13617 13618 13619 :param str work_request_id: (required) 13620 The OCID of the asynchronous request. 13621 13622 :param str opc_request_id: (optional) 13623 The client request ID for tracing. 13624 13625 :param str page: (optional) 13626 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 13627 13628 :param int limit: (optional) 13629 The maximum number of items to return. 13630 13631 :param str sort_by: (optional) 13632 The field to sort by. Only one sort order may be provided. Default order for TIMESTAMP is descending. Default order for MESSAGE is ascending. If no value is specified TIMESTAMP is default. 13633 13634 Allowed values are: "MESSAGE", "TIMESTAMP" 13635 13636 :param str sort_order: (optional) 13637 The sort order to use, either 'asc' or 'desc'. 13638 13639 Allowed values are: "ASC", "DESC" 13640 13641 :param obj retry_strategy: (optional) 13642 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13643 13644 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 13645 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13646 13647 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13648 13649 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_catalog.models.WorkRequestLog` 13650 :rtype: :class:`~oci.response.Response` 13651 13652 :example: 13653 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_work_request_logs.py.html>`__ to see an example of how to use list_work_request_logs API. 13654 """ 13655 resource_path = "/workRequests/{workRequestId}/logs" 13656 method = "GET" 13657 13658 # Don't accept unknown kwargs 13659 expected_kwargs = [ 13660 "retry_strategy", 13661 "opc_request_id", 13662 "page", 13663 "limit", 13664 "sort_by", 13665 "sort_order" 13666 ] 13667 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13668 if extra_kwargs: 13669 raise ValueError( 13670 "list_work_request_logs got unknown kwargs: {!r}".format(extra_kwargs)) 13671 13672 path_params = { 13673 "workRequestId": work_request_id 13674 } 13675 13676 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 13677 13678 for (k, v) in six.iteritems(path_params): 13679 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 13680 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 13681 13682 if 'sort_by' in kwargs: 13683 sort_by_allowed_values = ["MESSAGE", "TIMESTAMP"] 13684 if kwargs['sort_by'] not in sort_by_allowed_values: 13685 raise ValueError( 13686 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13687 ) 13688 13689 if 'sort_order' in kwargs: 13690 sort_order_allowed_values = ["ASC", "DESC"] 13691 if kwargs['sort_order'] not in sort_order_allowed_values: 13692 raise ValueError( 13693 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13694 ) 13695 13696 query_params = { 13697 "page": kwargs.get("page", missing), 13698 "limit": kwargs.get("limit", missing), 13699 "sortBy": kwargs.get("sort_by", missing), 13700 "sortOrder": kwargs.get("sort_order", missing) 13701 } 13702 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13703 13704 header_params = { 13705 "accept": "application/json", 13706 "content-type": "application/json", 13707 "opc-request-id": kwargs.get("opc_request_id", missing) 13708 } 13709 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 13710 13711 retry_strategy = self.base_client.get_preferred_retry_strategy( 13712 operation_retry_strategy=kwargs.get('retry_strategy'), 13713 client_retry_strategy=self.retry_strategy 13714 ) 13715 if retry_strategy is None: 13716 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 13717 13718 if retry_strategy: 13719 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13720 self.base_client.add_opc_client_retries_header(header_params) 13721 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13722 return retry_strategy.make_retrying_call( 13723 self.base_client.call_api, 13724 resource_path=resource_path, 13725 method=method, 13726 path_params=path_params, 13727 query_params=query_params, 13728 header_params=header_params, 13729 response_type="list[WorkRequestLog]") 13730 else: 13731 return self.base_client.call_api( 13732 resource_path=resource_path, 13733 method=method, 13734 path_params=path_params, 13735 query_params=query_params, 13736 header_params=header_params, 13737 response_type="list[WorkRequestLog]") 13738 13739 def list_work_requests(self, compartment_id, **kwargs): 13740 """ 13741 Lists the work requests in a compartment. 13742 13743 13744 :param str compartment_id: (required) 13745 The OCID of the compartment where you want to list resources. 13746 13747 :param str opc_request_id: (optional) 13748 The client request ID for tracing. 13749 13750 :param str page: (optional) 13751 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 13752 13753 :param int limit: (optional) 13754 The maximum number of items to return. 13755 13756 :param obj retry_strategy: (optional) 13757 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13758 13759 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 13760 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13761 13762 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13763 13764 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_catalog.models.WorkRequest` 13765 :rtype: :class:`~oci.response.Response` 13766 13767 :example: 13768 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API. 13769 """ 13770 resource_path = "/workRequests" 13771 method = "GET" 13772 13773 # Don't accept unknown kwargs 13774 expected_kwargs = [ 13775 "retry_strategy", 13776 "opc_request_id", 13777 "page", 13778 "limit" 13779 ] 13780 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13781 if extra_kwargs: 13782 raise ValueError( 13783 "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) 13784 13785 query_params = { 13786 "compartmentId": compartment_id, 13787 "page": kwargs.get("page", missing), 13788 "limit": kwargs.get("limit", missing) 13789 } 13790 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13791 13792 header_params = { 13793 "accept": "application/json", 13794 "content-type": "application/json", 13795 "opc-request-id": kwargs.get("opc_request_id", missing) 13796 } 13797 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 13798 13799 retry_strategy = self.base_client.get_preferred_retry_strategy( 13800 operation_retry_strategy=kwargs.get('retry_strategy'), 13801 client_retry_strategy=self.retry_strategy 13802 ) 13803 if retry_strategy is None: 13804 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 13805 13806 if retry_strategy: 13807 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13808 self.base_client.add_opc_client_retries_header(header_params) 13809 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13810 return retry_strategy.make_retrying_call( 13811 self.base_client.call_api, 13812 resource_path=resource_path, 13813 method=method, 13814 query_params=query_params, 13815 header_params=header_params, 13816 response_type="list[WorkRequest]") 13817 else: 13818 return self.base_client.call_api( 13819 resource_path=resource_path, 13820 method=method, 13821 query_params=query_params, 13822 header_params=header_params, 13823 response_type="list[WorkRequest]") 13824 13825 def object_stats(self, catalog_id, **kwargs): 13826 """ 13827 Returns stats on objects by type in the repository. 13828 13829 13830 :param str catalog_id: (required) 13831 Unique catalog identifier. 13832 13833 :param str sort_by: (optional) 13834 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 13835 13836 Allowed values are: "TIMECREATED", "DISPLAYNAME" 13837 13838 :param str sort_order: (optional) 13839 The sort order to use, either 'asc' or 'desc'. 13840 13841 Allowed values are: "ASC", "DESC" 13842 13843 :param int limit: (optional) 13844 The maximum number of items to return. 13845 13846 :param str page: (optional) 13847 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 13848 13849 :param str opc_request_id: (optional) 13850 The client request ID for tracing. 13851 13852 :param obj retry_strategy: (optional) 13853 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13854 13855 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 13856 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13857 13858 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13859 13860 :return: A :class:`~oci.response.Response` object with data of type str 13861 :rtype: :class:`~oci.response.Response` 13862 13863 :example: 13864 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/object_stats.py.html>`__ to see an example of how to use object_stats API. 13865 """ 13866 resource_path = "/catalogs/{catalogId}/actions/objectStats" 13867 method = "POST" 13868 13869 # Don't accept unknown kwargs 13870 expected_kwargs = [ 13871 "retry_strategy", 13872 "sort_by", 13873 "sort_order", 13874 "limit", 13875 "page", 13876 "opc_request_id" 13877 ] 13878 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 13879 if extra_kwargs: 13880 raise ValueError( 13881 "object_stats got unknown kwargs: {!r}".format(extra_kwargs)) 13882 13883 path_params = { 13884 "catalogId": catalog_id 13885 } 13886 13887 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 13888 13889 for (k, v) in six.iteritems(path_params): 13890 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 13891 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 13892 13893 if 'sort_by' in kwargs: 13894 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 13895 if kwargs['sort_by'] not in sort_by_allowed_values: 13896 raise ValueError( 13897 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 13898 ) 13899 13900 if 'sort_order' in kwargs: 13901 sort_order_allowed_values = ["ASC", "DESC"] 13902 if kwargs['sort_order'] not in sort_order_allowed_values: 13903 raise ValueError( 13904 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 13905 ) 13906 13907 query_params = { 13908 "sortBy": kwargs.get("sort_by", missing), 13909 "sortOrder": kwargs.get("sort_order", missing), 13910 "limit": kwargs.get("limit", missing), 13911 "page": kwargs.get("page", missing) 13912 } 13913 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 13914 13915 header_params = { 13916 "accept": "application/json", 13917 "content-type": "application/json", 13918 "opc-request-id": kwargs.get("opc_request_id", missing) 13919 } 13920 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 13921 13922 retry_strategy = self.base_client.get_preferred_retry_strategy( 13923 operation_retry_strategy=kwargs.get('retry_strategy'), 13924 client_retry_strategy=self.retry_strategy 13925 ) 13926 if retry_strategy is None: 13927 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 13928 13929 if retry_strategy: 13930 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 13931 self.base_client.add_opc_client_retries_header(header_params) 13932 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 13933 return retry_strategy.make_retrying_call( 13934 self.base_client.call_api, 13935 resource_path=resource_path, 13936 method=method, 13937 path_params=path_params, 13938 query_params=query_params, 13939 header_params=header_params, 13940 response_type="str") 13941 else: 13942 return self.base_client.call_api( 13943 resource_path=resource_path, 13944 method=method, 13945 path_params=path_params, 13946 query_params=query_params, 13947 header_params=header_params, 13948 response_type="str") 13949 13950 def parse_connection(self, catalog_id, data_asset_key, parse_connection_details, **kwargs): 13951 """ 13952 Parse data asset references through connections from this data asset. 13953 13954 13955 :param str catalog_id: (required) 13956 Unique catalog identifier. 13957 13958 :param str data_asset_key: (required) 13959 Unique data asset key. 13960 13961 :param oci.data_catalog.models.ParseConnectionDetails parse_connection_details: (required) 13962 The information used to parse the connections from payload or connection detail. 13963 13964 :param str connection_key: (optional) 13965 Unique connection key. 13966 13967 :param str opc_request_id: (optional) 13968 The client request ID for tracing. 13969 13970 :param str opc_retry_token: (optional) 13971 A token that uniquely identifies a request so it can be retried in case of a timeout or 13972 server error without risk of executing that same action again. Retry tokens expire after 24 13973 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 13974 has been deleted and purged from the system, then a retry of the original creation request 13975 might be rejected. 13976 13977 :param obj retry_strategy: (optional) 13978 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 13979 13980 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 13981 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 13982 13983 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 13984 13985 :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_catalog.models.ConnectionAliasSummary` 13986 :rtype: :class:`~oci.response.Response` 13987 13988 :example: 13989 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/parse_connection.py.html>`__ to see an example of how to use parse_connection API. 13990 """ 13991 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/actions/parseConnection" 13992 method = "POST" 13993 13994 # Don't accept unknown kwargs 13995 expected_kwargs = [ 13996 "retry_strategy", 13997 "connection_key", 13998 "opc_request_id", 13999 "opc_retry_token" 14000 ] 14001 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14002 if extra_kwargs: 14003 raise ValueError( 14004 "parse_connection got unknown kwargs: {!r}".format(extra_kwargs)) 14005 14006 path_params = { 14007 "catalogId": catalog_id, 14008 "dataAssetKey": data_asset_key 14009 } 14010 14011 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14012 14013 for (k, v) in six.iteritems(path_params): 14014 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14015 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14016 14017 query_params = { 14018 "connectionKey": kwargs.get("connection_key", missing) 14019 } 14020 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14021 14022 header_params = { 14023 "accept": "application/json", 14024 "content-type": "application/json", 14025 "opc-request-id": kwargs.get("opc_request_id", missing), 14026 "opc-retry-token": kwargs.get("opc_retry_token", missing) 14027 } 14028 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 14029 14030 retry_strategy = self.base_client.get_preferred_retry_strategy( 14031 operation_retry_strategy=kwargs.get('retry_strategy'), 14032 client_retry_strategy=self.retry_strategy 14033 ) 14034 14035 if retry_strategy: 14036 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14037 self.base_client.add_opc_retry_token_if_needed(header_params) 14038 self.base_client.add_opc_client_retries_header(header_params) 14039 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14040 return retry_strategy.make_retrying_call( 14041 self.base_client.call_api, 14042 resource_path=resource_path, 14043 method=method, 14044 path_params=path_params, 14045 query_params=query_params, 14046 header_params=header_params, 14047 body=parse_connection_details, 14048 response_type="list[ConnectionAliasSummary]") 14049 else: 14050 return self.base_client.call_api( 14051 resource_path=resource_path, 14052 method=method, 14053 path_params=path_params, 14054 query_params=query_params, 14055 header_params=header_params, 14056 body=parse_connection_details, 14057 response_type="list[ConnectionAliasSummary]") 14058 14059 def process_recommendation(self, catalog_id, process_recommendation_details, **kwargs): 14060 """ 14061 Act on a recommendation. A recommendation can be accepted or rejected. For example, if a recommendation of type LINK_GLOSSARY_TERM 14062 is accepted, the system will link the source object (e.g. an attribute) to a target glossary term. 14063 14064 14065 :param str catalog_id: (required) 14066 Unique catalog identifier. 14067 14068 :param oci.data_catalog.models.ProcessRecommendationDetails process_recommendation_details: (required) 14069 Recommendation to be processed. 14070 14071 :param str if_match: (optional) 14072 For optimistic concurrency control. In the PUT or DELETE call 14073 for a resource, set the `if-match` parameter to the value of the 14074 etag from a previous GET or POST response for that resource. 14075 The resource will be updated or deleted only if the etag you 14076 provide matches the resource's current etag value. 14077 14078 :param str opc_request_id: (optional) 14079 The client request ID for tracing. 14080 14081 :param obj retry_strategy: (optional) 14082 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14083 14084 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 14085 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14086 14087 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14088 14089 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.ProcessRecommendationDetails` 14090 :rtype: :class:`~oci.response.Response` 14091 14092 :example: 14093 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/process_recommendation.py.html>`__ to see an example of how to use process_recommendation API. 14094 """ 14095 resource_path = "/catalogs/{catalogId}/actions/processRecommendation" 14096 method = "POST" 14097 14098 # Don't accept unknown kwargs 14099 expected_kwargs = [ 14100 "retry_strategy", 14101 "if_match", 14102 "opc_request_id" 14103 ] 14104 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14105 if extra_kwargs: 14106 raise ValueError( 14107 "process_recommendation got unknown kwargs: {!r}".format(extra_kwargs)) 14108 14109 path_params = { 14110 "catalogId": catalog_id 14111 } 14112 14113 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14114 14115 for (k, v) in six.iteritems(path_params): 14116 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14117 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14118 14119 header_params = { 14120 "accept": "application/json", 14121 "content-type": "application/json", 14122 "if-match": kwargs.get("if_match", missing), 14123 "opc-request-id": kwargs.get("opc_request_id", missing) 14124 } 14125 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 14126 14127 retry_strategy = self.base_client.get_preferred_retry_strategy( 14128 operation_retry_strategy=kwargs.get('retry_strategy'), 14129 client_retry_strategy=self.retry_strategy 14130 ) 14131 14132 if retry_strategy: 14133 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14134 self.base_client.add_opc_client_retries_header(header_params) 14135 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14136 return retry_strategy.make_retrying_call( 14137 self.base_client.call_api, 14138 resource_path=resource_path, 14139 method=method, 14140 path_params=path_params, 14141 header_params=header_params, 14142 body=process_recommendation_details, 14143 response_type="ProcessRecommendationDetails") 14144 else: 14145 return self.base_client.call_api( 14146 resource_path=resource_path, 14147 method=method, 14148 path_params=path_params, 14149 header_params=header_params, 14150 body=process_recommendation_details, 14151 response_type="ProcessRecommendationDetails") 14152 14153 def recommendations(self, catalog_id, recommendation_type, source_object_key, source_object_type, **kwargs): 14154 """ 14155 Returns a list of recommendations for the given object and recommendation type. 14156 By default, it will return inferred recommendations for review. The optional query param 'RecommendationStatus' can be set, 14157 to return only recommendations having that status. 14158 14159 14160 :param str catalog_id: (required) 14161 Unique catalog identifier. 14162 14163 :param oci.data_catalog.models.list[str] recommendation_type: (required) 14164 A filter used to return only recommendations of the specified type. 14165 14166 Allowed values are: "LINK_GLOSSARY_TERM" 14167 14168 :param str source_object_key: (required) 14169 A filter used to provide the unique identifier of the source object, for which a list of recommendations will be returned for review. 14170 14171 :param str source_object_type: (required) 14172 A filter used to provide the type of the source object, for which a list of recommendations will be returned for review. 14173 14174 Allowed values are: "DATA_ENTITY", "ATTRIBUTE", "TERM", "CATEGORY" 14175 14176 :param str recommendation_status: (optional) 14177 A filter used to return only recommendations having the requested status. 14178 14179 Allowed values are: "ACCEPTED", "REJECTED", "INFERRED" 14180 14181 :param str opc_request_id: (optional) 14182 The client request ID for tracing. 14183 14184 :param obj retry_strategy: (optional) 14185 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14186 14187 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 14188 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14189 14190 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14191 14192 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.RecommendationCollection` 14193 :rtype: :class:`~oci.response.Response` 14194 14195 :example: 14196 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/recommendations.py.html>`__ to see an example of how to use recommendations API. 14197 """ 14198 resource_path = "/catalogs/{catalogId}/actions/getRecommendations" 14199 method = "POST" 14200 14201 # Don't accept unknown kwargs 14202 expected_kwargs = [ 14203 "retry_strategy", 14204 "recommendation_status", 14205 "opc_request_id" 14206 ] 14207 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14208 if extra_kwargs: 14209 raise ValueError( 14210 "recommendations got unknown kwargs: {!r}".format(extra_kwargs)) 14211 14212 path_params = { 14213 "catalogId": catalog_id 14214 } 14215 14216 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14217 14218 for (k, v) in six.iteritems(path_params): 14219 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14220 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14221 14222 recommendation_type_allowed_values = ["LINK_GLOSSARY_TERM"] 14223 for recommendation_type_item in recommendation_type: 14224 if recommendation_type_item not in recommendation_type_allowed_values: 14225 raise ValueError( 14226 "Invalid value for `recommendation_type`, must be one of {0}".format(recommendation_type_allowed_values) 14227 ) 14228 14229 source_object_type_allowed_values = ["DATA_ENTITY", "ATTRIBUTE", "TERM", "CATEGORY"] 14230 if source_object_type not in source_object_type_allowed_values: 14231 raise ValueError( 14232 "Invalid value for `source_object_type`, must be one of {0}".format(source_object_type_allowed_values) 14233 ) 14234 14235 if 'recommendation_status' in kwargs: 14236 recommendation_status_allowed_values = ["ACCEPTED", "REJECTED", "INFERRED"] 14237 if kwargs['recommendation_status'] not in recommendation_status_allowed_values: 14238 raise ValueError( 14239 "Invalid value for `recommendation_status`, must be one of {0}".format(recommendation_status_allowed_values) 14240 ) 14241 14242 query_params = { 14243 "recommendationType": self.base_client.generate_collection_format_param(recommendation_type, 'multi'), 14244 "sourceObjectKey": source_object_key, 14245 "sourceObjectType": source_object_type, 14246 "recommendationStatus": kwargs.get("recommendation_status", missing) 14247 } 14248 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14249 14250 header_params = { 14251 "accept": "application/json", 14252 "content-type": "application/json", 14253 "opc-request-id": kwargs.get("opc_request_id", missing) 14254 } 14255 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 14256 14257 retry_strategy = self.base_client.get_preferred_retry_strategy( 14258 operation_retry_strategy=kwargs.get('retry_strategy'), 14259 client_retry_strategy=self.retry_strategy 14260 ) 14261 14262 if retry_strategy: 14263 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14264 self.base_client.add_opc_client_retries_header(header_params) 14265 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14266 return retry_strategy.make_retrying_call( 14267 self.base_client.call_api, 14268 resource_path=resource_path, 14269 method=method, 14270 path_params=path_params, 14271 query_params=query_params, 14272 header_params=header_params, 14273 response_type="RecommendationCollection") 14274 else: 14275 return self.base_client.call_api( 14276 resource_path=resource_path, 14277 method=method, 14278 path_params=path_params, 14279 query_params=query_params, 14280 header_params=header_params, 14281 response_type="RecommendationCollection") 14282 14283 def remove_data_selector_patterns(self, catalog_id, data_asset_key, data_selector_pattern_details, **kwargs): 14284 """ 14285 Remove data selector pattern from the data asset. 14286 14287 14288 :param str catalog_id: (required) 14289 Unique catalog identifier. 14290 14291 :param str data_asset_key: (required) 14292 Unique data asset key. 14293 14294 :param oci.data_catalog.models.DataSelectorPatternDetails data_selector_pattern_details: (required) 14295 The information used to remove the data selector patterns. 14296 14297 :param str opc_request_id: (optional) 14298 The client request ID for tracing. 14299 14300 :param str if_match: (optional) 14301 For optimistic concurrency control. In the PUT or DELETE call 14302 for a resource, set the `if-match` parameter to the value of the 14303 etag from a previous GET or POST response for that resource. 14304 The resource will be updated or deleted only if the etag you 14305 provide matches the resource's current etag value. 14306 14307 :param str opc_retry_token: (optional) 14308 A token that uniquely identifies a request so it can be retried in case of a timeout or 14309 server error without risk of executing that same action again. Retry tokens expire after 24 14310 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 14311 has been deleted and purged from the system, then a retry of the original creation request 14312 might be rejected. 14313 14314 :param obj retry_strategy: (optional) 14315 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14316 14317 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 14318 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14319 14320 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14321 14322 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.DataAsset` 14323 :rtype: :class:`~oci.response.Response` 14324 14325 :example: 14326 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/remove_data_selector_patterns.py.html>`__ to see an example of how to use remove_data_selector_patterns API. 14327 """ 14328 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/actions/removeDataSelectorPatterns" 14329 method = "POST" 14330 14331 # Don't accept unknown kwargs 14332 expected_kwargs = [ 14333 "retry_strategy", 14334 "opc_request_id", 14335 "if_match", 14336 "opc_retry_token" 14337 ] 14338 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14339 if extra_kwargs: 14340 raise ValueError( 14341 "remove_data_selector_patterns got unknown kwargs: {!r}".format(extra_kwargs)) 14342 14343 path_params = { 14344 "catalogId": catalog_id, 14345 "dataAssetKey": data_asset_key 14346 } 14347 14348 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14349 14350 for (k, v) in six.iteritems(path_params): 14351 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14352 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14353 14354 header_params = { 14355 "accept": "application/json", 14356 "content-type": "application/json", 14357 "opc-request-id": kwargs.get("opc_request_id", missing), 14358 "if-match": kwargs.get("if_match", missing), 14359 "opc-retry-token": kwargs.get("opc_retry_token", missing) 14360 } 14361 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 14362 14363 retry_strategy = self.base_client.get_preferred_retry_strategy( 14364 operation_retry_strategy=kwargs.get('retry_strategy'), 14365 client_retry_strategy=self.retry_strategy 14366 ) 14367 14368 if retry_strategy: 14369 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14370 self.base_client.add_opc_retry_token_if_needed(header_params) 14371 self.base_client.add_opc_client_retries_header(header_params) 14372 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14373 return retry_strategy.make_retrying_call( 14374 self.base_client.call_api, 14375 resource_path=resource_path, 14376 method=method, 14377 path_params=path_params, 14378 header_params=header_params, 14379 body=data_selector_pattern_details, 14380 response_type="DataAsset") 14381 else: 14382 return self.base_client.call_api( 14383 resource_path=resource_path, 14384 method=method, 14385 path_params=path_params, 14386 header_params=header_params, 14387 body=data_selector_pattern_details, 14388 response_type="DataAsset") 14389 14390 def search_criteria(self, catalog_id, **kwargs): 14391 """ 14392 Returns a list of search results within a data catalog. 14393 14394 14395 :param str catalog_id: (required) 14396 Unique catalog identifier. 14397 14398 :param oci.data_catalog.models.SearchCriteria search_criteria_details: (optional) 14399 The information used to create an extended search results. 14400 14401 :param str display_name: (optional) 14402 A filter to return only resources that match the entire display name given. The match is not case sensitive. 14403 14404 :param str name: (optional) 14405 Immutable resource name. 14406 14407 :param str lifecycle_state: (optional) 14408 A filter to return only resources that match the specified lifecycle state. The value is case insensitive. 14409 14410 Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING" 14411 14412 :param str timeout: (optional) 14413 A search timeout string (for example, timeout=4000ms), bounding the search request to be executed within the 14414 specified time value and bail with the hits accumulated up to that point when expired. 14415 Defaults to no timeout. 14416 14417 :param str sort_by: (optional) 14418 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 14419 14420 Allowed values are: "TIMECREATED", "DISPLAYNAME" 14421 14422 :param str sort_order: (optional) 14423 The sort order to use, either 'asc' or 'desc'. 14424 14425 Allowed values are: "ASC", "DESC" 14426 14427 :param int limit: (optional) 14428 The maximum number of items to return. 14429 14430 :param str page: (optional) 14431 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 14432 14433 :param str opc_request_id: (optional) 14434 The client request ID for tracing. 14435 14436 :param obj retry_strategy: (optional) 14437 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14438 14439 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 14440 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14441 14442 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14443 14444 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.SearchResultCollection` 14445 :rtype: :class:`~oci.response.Response` 14446 14447 :example: 14448 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/search_criteria.py.html>`__ to see an example of how to use search_criteria API. 14449 """ 14450 resource_path = "/catalogs/{catalogId}/search" 14451 method = "POST" 14452 14453 # Don't accept unknown kwargs 14454 expected_kwargs = [ 14455 "retry_strategy", 14456 "search_criteria_details", 14457 "display_name", 14458 "name", 14459 "lifecycle_state", 14460 "timeout", 14461 "sort_by", 14462 "sort_order", 14463 "limit", 14464 "page", 14465 "opc_request_id" 14466 ] 14467 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14468 if extra_kwargs: 14469 raise ValueError( 14470 "search_criteria got unknown kwargs: {!r}".format(extra_kwargs)) 14471 14472 path_params = { 14473 "catalogId": catalog_id 14474 } 14475 14476 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14477 14478 for (k, v) in six.iteritems(path_params): 14479 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14480 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14481 14482 if 'lifecycle_state' in kwargs: 14483 lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"] 14484 if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: 14485 raise ValueError( 14486 "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) 14487 ) 14488 14489 if 'sort_by' in kwargs: 14490 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 14491 if kwargs['sort_by'] not in sort_by_allowed_values: 14492 raise ValueError( 14493 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 14494 ) 14495 14496 if 'sort_order' in kwargs: 14497 sort_order_allowed_values = ["ASC", "DESC"] 14498 if kwargs['sort_order'] not in sort_order_allowed_values: 14499 raise ValueError( 14500 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 14501 ) 14502 14503 query_params = { 14504 "displayName": kwargs.get("display_name", missing), 14505 "name": kwargs.get("name", missing), 14506 "lifecycleState": kwargs.get("lifecycle_state", missing), 14507 "timeout": kwargs.get("timeout", missing), 14508 "sortBy": kwargs.get("sort_by", missing), 14509 "sortOrder": kwargs.get("sort_order", missing), 14510 "limit": kwargs.get("limit", missing), 14511 "page": kwargs.get("page", missing) 14512 } 14513 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14514 14515 header_params = { 14516 "accept": "application/json", 14517 "content-type": "application/json", 14518 "opc-request-id": kwargs.get("opc_request_id", missing) 14519 } 14520 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 14521 14522 retry_strategy = self.base_client.get_preferred_retry_strategy( 14523 operation_retry_strategy=kwargs.get('retry_strategy'), 14524 client_retry_strategy=self.retry_strategy 14525 ) 14526 if retry_strategy is None: 14527 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 14528 14529 if retry_strategy: 14530 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14531 self.base_client.add_opc_client_retries_header(header_params) 14532 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14533 return retry_strategy.make_retrying_call( 14534 self.base_client.call_api, 14535 resource_path=resource_path, 14536 method=method, 14537 path_params=path_params, 14538 query_params=query_params, 14539 header_params=header_params, 14540 body=kwargs.get('search_criteria_details'), 14541 response_type="SearchResultCollection") 14542 else: 14543 return self.base_client.call_api( 14544 resource_path=resource_path, 14545 method=method, 14546 path_params=path_params, 14547 query_params=query_params, 14548 header_params=header_params, 14549 body=kwargs.get('search_criteria_details'), 14550 response_type="SearchResultCollection") 14551 14552 def suggest_matches(self, catalog_id, input_text, **kwargs): 14553 """ 14554 Returns a list of potential string matches for a given input string. 14555 14556 14557 :param str catalog_id: (required) 14558 Unique catalog identifier. 14559 14560 :param str input_text: (required) 14561 Text input string used for computing potential matching suggestions. 14562 14563 :param str timeout: (optional) 14564 A search timeout string (for example, timeout=4000ms), bounding the search request to be executed within the 14565 specified time value and bail with the hits accumulated up to that point when expired. 14566 Defaults to no timeout. 14567 14568 :param int limit: (optional) 14569 Limit for the list of potential matches returned from the Suggest API. If not specified, will default to 10. 14570 14571 :param str opc_request_id: (optional) 14572 The client request ID for tracing. 14573 14574 :param obj retry_strategy: (optional) 14575 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14576 14577 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 14578 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14579 14580 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14581 14582 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.SuggestResults` 14583 :rtype: :class:`~oci.response.Response` 14584 14585 :example: 14586 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/suggest_matches.py.html>`__ to see an example of how to use suggest_matches API. 14587 """ 14588 resource_path = "/catalogs/{catalogId}/actions/suggest" 14589 method = "POST" 14590 14591 # Don't accept unknown kwargs 14592 expected_kwargs = [ 14593 "retry_strategy", 14594 "timeout", 14595 "limit", 14596 "opc_request_id" 14597 ] 14598 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14599 if extra_kwargs: 14600 raise ValueError( 14601 "suggest_matches got unknown kwargs: {!r}".format(extra_kwargs)) 14602 14603 path_params = { 14604 "catalogId": catalog_id 14605 } 14606 14607 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14608 14609 for (k, v) in six.iteritems(path_params): 14610 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14611 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14612 14613 query_params = { 14614 "timeout": kwargs.get("timeout", missing), 14615 "inputText": input_text, 14616 "limit": kwargs.get("limit", missing) 14617 } 14618 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14619 14620 header_params = { 14621 "accept": "application/json", 14622 "content-type": "application/json", 14623 "opc-request-id": kwargs.get("opc_request_id", missing) 14624 } 14625 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 14626 14627 retry_strategy = self.base_client.get_preferred_retry_strategy( 14628 operation_retry_strategy=kwargs.get('retry_strategy'), 14629 client_retry_strategy=self.retry_strategy 14630 ) 14631 if retry_strategy is None: 14632 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 14633 14634 if retry_strategy: 14635 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14636 self.base_client.add_opc_client_retries_header(header_params) 14637 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14638 return retry_strategy.make_retrying_call( 14639 self.base_client.call_api, 14640 resource_path=resource_path, 14641 method=method, 14642 path_params=path_params, 14643 query_params=query_params, 14644 header_params=header_params, 14645 response_type="SuggestResults") 14646 else: 14647 return self.base_client.call_api( 14648 resource_path=resource_path, 14649 method=method, 14650 path_params=path_params, 14651 query_params=query_params, 14652 header_params=header_params, 14653 response_type="SuggestResults") 14654 14655 def synchronous_export_data_asset(self, catalog_id, data_asset_key, synchronous_export_data_asset_details, export_type, **kwargs): 14656 """ 14657 Export technical objects from a Data Asset 14658 14659 14660 :param str catalog_id: (required) 14661 Unique catalog identifier. 14662 14663 :param str data_asset_key: (required) 14664 Unique data asset key. 14665 14666 :param oci.data_catalog.models.ExportDataAssetDetails synchronous_export_data_asset_details: (required) 14667 The details of what needs to be exported. 14668 14669 :param oci.data_catalog.models.list[str] export_type: (required) 14670 Type of export. 14671 14672 Allowed values are: "CUSTOM_PROPERTY_VALUES", "ALL" 14673 14674 :param str opc_request_id: (optional) 14675 The client request ID for tracing. 14676 14677 :param str opc_retry_token: (optional) 14678 A token that uniquely identifies a request so it can be retried in case of a timeout or 14679 server error without risk of executing that same action again. Retry tokens expire after 24 14680 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 14681 has been deleted and purged from the system, then a retry of the original creation request 14682 might be rejected. 14683 14684 :param obj retry_strategy: (optional) 14685 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14686 14687 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 14688 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14689 14690 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14691 14692 :return: A :class:`~oci.response.Response` object with data of type stream 14693 :rtype: :class:`~oci.response.Response` 14694 14695 :example: 14696 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/synchronous_export_data_asset.py.html>`__ to see an example of how to use synchronous_export_data_asset API. 14697 """ 14698 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/actions/synchronousExport" 14699 method = "POST" 14700 14701 # Don't accept unknown kwargs 14702 expected_kwargs = [ 14703 "retry_strategy", 14704 "opc_request_id", 14705 "opc_retry_token" 14706 ] 14707 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14708 if extra_kwargs: 14709 raise ValueError( 14710 "synchronous_export_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) 14711 14712 path_params = { 14713 "catalogId": catalog_id, 14714 "dataAssetKey": data_asset_key 14715 } 14716 14717 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14718 14719 for (k, v) in six.iteritems(path_params): 14720 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14721 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14722 14723 export_type_allowed_values = ["CUSTOM_PROPERTY_VALUES", "ALL"] 14724 for export_type_item in export_type: 14725 if export_type_item not in export_type_allowed_values: 14726 raise ValueError( 14727 "Invalid value for `export_type`, must be one of {0}".format(export_type_allowed_values) 14728 ) 14729 14730 query_params = { 14731 "exportType": self.base_client.generate_collection_format_param(export_type, 'multi') 14732 } 14733 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 14734 14735 header_params = { 14736 "accept": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 14737 "content-type": "application/json", 14738 "opc-request-id": kwargs.get("opc_request_id", missing), 14739 "opc-retry-token": kwargs.get("opc_retry_token", missing) 14740 } 14741 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 14742 14743 retry_strategy = self.base_client.get_preferred_retry_strategy( 14744 operation_retry_strategy=kwargs.get('retry_strategy'), 14745 client_retry_strategy=self.retry_strategy 14746 ) 14747 14748 if retry_strategy: 14749 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14750 self.base_client.add_opc_retry_token_if_needed(header_params) 14751 self.base_client.add_opc_client_retries_header(header_params) 14752 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14753 return retry_strategy.make_retrying_call( 14754 self.base_client.call_api, 14755 resource_path=resource_path, 14756 method=method, 14757 path_params=path_params, 14758 query_params=query_params, 14759 header_params=header_params, 14760 body=synchronous_export_data_asset_details, 14761 response_type="stream") 14762 else: 14763 return self.base_client.call_api( 14764 resource_path=resource_path, 14765 method=method, 14766 path_params=path_params, 14767 query_params=query_params, 14768 header_params=header_params, 14769 body=synchronous_export_data_asset_details, 14770 response_type="stream") 14771 14772 def test_connection(self, catalog_id, data_asset_key, connection_key, **kwargs): 14773 """ 14774 Test the connection by connecting to the data asset using credentials in the metadata. 14775 14776 14777 :param str catalog_id: (required) 14778 Unique catalog identifier. 14779 14780 :param str data_asset_key: (required) 14781 Unique data asset key. 14782 14783 :param str connection_key: (required) 14784 Unique connection key. 14785 14786 :param str opc_request_id: (optional) 14787 The client request ID for tracing. 14788 14789 :param str opc_retry_token: (optional) 14790 A token that uniquely identifies a request so it can be retried in case of a timeout or 14791 server error without risk of executing that same action again. Retry tokens expire after 24 14792 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 14793 has been deleted and purged from the system, then a retry of the original creation request 14794 might be rejected. 14795 14796 :param obj retry_strategy: (optional) 14797 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14798 14799 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 14800 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14801 14802 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14803 14804 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.ValidateConnectionResult` 14805 :rtype: :class:`~oci.response.Response` 14806 14807 :example: 14808 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/test_connection.py.html>`__ to see an example of how to use test_connection API. 14809 """ 14810 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/connections/{connectionKey}/actions/test" 14811 method = "POST" 14812 14813 # Don't accept unknown kwargs 14814 expected_kwargs = [ 14815 "retry_strategy", 14816 "opc_request_id", 14817 "opc_retry_token" 14818 ] 14819 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14820 if extra_kwargs: 14821 raise ValueError( 14822 "test_connection got unknown kwargs: {!r}".format(extra_kwargs)) 14823 14824 path_params = { 14825 "catalogId": catalog_id, 14826 "dataAssetKey": data_asset_key, 14827 "connectionKey": connection_key 14828 } 14829 14830 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14831 14832 for (k, v) in six.iteritems(path_params): 14833 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14834 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14835 14836 header_params = { 14837 "accept": "application/json", 14838 "content-type": "application/json", 14839 "opc-request-id": kwargs.get("opc_request_id", missing), 14840 "opc-retry-token": kwargs.get("opc_retry_token", missing) 14841 } 14842 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 14843 14844 retry_strategy = self.base_client.get_preferred_retry_strategy( 14845 operation_retry_strategy=kwargs.get('retry_strategy'), 14846 client_retry_strategy=self.retry_strategy 14847 ) 14848 if retry_strategy is None: 14849 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 14850 14851 if retry_strategy: 14852 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14853 self.base_client.add_opc_retry_token_if_needed(header_params) 14854 self.base_client.add_opc_client_retries_header(header_params) 14855 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14856 return retry_strategy.make_retrying_call( 14857 self.base_client.call_api, 14858 resource_path=resource_path, 14859 method=method, 14860 path_params=path_params, 14861 header_params=header_params, 14862 response_type="ValidateConnectionResult") 14863 else: 14864 return self.base_client.call_api( 14865 resource_path=resource_path, 14866 method=method, 14867 path_params=path_params, 14868 header_params=header_params, 14869 response_type="ValidateConnectionResult") 14870 14871 def update_attribute(self, catalog_id, data_asset_key, entity_key, attribute_key, update_attribute_details, **kwargs): 14872 """ 14873 Updates a specific data asset attribute. 14874 14875 14876 :param str catalog_id: (required) 14877 Unique catalog identifier. 14878 14879 :param str data_asset_key: (required) 14880 Unique data asset key. 14881 14882 :param str entity_key: (required) 14883 Unique entity key. 14884 14885 :param str attribute_key: (required) 14886 Unique attribute key. 14887 14888 :param oci.data_catalog.models.UpdateAttributeDetails update_attribute_details: (required) 14889 The information to be updated in the attribute. 14890 14891 :param str if_match: (optional) 14892 For optimistic concurrency control. In the PUT or DELETE call 14893 for a resource, set the `if-match` parameter to the value of the 14894 etag from a previous GET or POST response for that resource. 14895 The resource will be updated or deleted only if the etag you 14896 provide matches the resource's current etag value. 14897 14898 :param str opc_request_id: (optional) 14899 The client request ID for tracing. 14900 14901 :param obj retry_strategy: (optional) 14902 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14903 14904 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 14905 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 14906 14907 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 14908 14909 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Attribute` 14910 :rtype: :class:`~oci.response.Response` 14911 14912 :example: 14913 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_attribute.py.html>`__ to see an example of how to use update_attribute API. 14914 """ 14915 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/attributes/{attributeKey}" 14916 method = "PUT" 14917 14918 # Don't accept unknown kwargs 14919 expected_kwargs = [ 14920 "retry_strategy", 14921 "if_match", 14922 "opc_request_id" 14923 ] 14924 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 14925 if extra_kwargs: 14926 raise ValueError( 14927 "update_attribute got unknown kwargs: {!r}".format(extra_kwargs)) 14928 14929 path_params = { 14930 "catalogId": catalog_id, 14931 "dataAssetKey": data_asset_key, 14932 "entityKey": entity_key, 14933 "attributeKey": attribute_key 14934 } 14935 14936 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 14937 14938 for (k, v) in six.iteritems(path_params): 14939 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 14940 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 14941 14942 header_params = { 14943 "accept": "application/json", 14944 "content-type": "application/json", 14945 "if-match": kwargs.get("if_match", missing), 14946 "opc-request-id": kwargs.get("opc_request_id", missing) 14947 } 14948 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 14949 14950 retry_strategy = self.base_client.get_preferred_retry_strategy( 14951 operation_retry_strategy=kwargs.get('retry_strategy'), 14952 client_retry_strategy=self.retry_strategy 14953 ) 14954 14955 if retry_strategy: 14956 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 14957 self.base_client.add_opc_client_retries_header(header_params) 14958 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 14959 return retry_strategy.make_retrying_call( 14960 self.base_client.call_api, 14961 resource_path=resource_path, 14962 method=method, 14963 path_params=path_params, 14964 header_params=header_params, 14965 body=update_attribute_details, 14966 response_type="Attribute") 14967 else: 14968 return self.base_client.call_api( 14969 resource_path=resource_path, 14970 method=method, 14971 path_params=path_params, 14972 header_params=header_params, 14973 body=update_attribute_details, 14974 response_type="Attribute") 14975 14976 def update_catalog(self, catalog_id, update_catalog_details, **kwargs): 14977 """ 14978 Updates the data catalog. 14979 14980 14981 :param str catalog_id: (required) 14982 Unique catalog identifier. 14983 14984 :param oci.data_catalog.models.UpdateCatalogDetails update_catalog_details: (required) 14985 The data catalog information to be updated. 14986 14987 :param str if_match: (optional) 14988 For optimistic concurrency control. In the PUT or DELETE call 14989 for a resource, set the `if-match` parameter to the value of the 14990 etag from a previous GET or POST response for that resource. 14991 The resource will be updated or deleted only if the etag you 14992 provide matches the resource's current etag value. 14993 14994 :param str opc_request_id: (optional) 14995 The client request ID for tracing. 14996 14997 :param obj retry_strategy: (optional) 14998 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 14999 15000 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15001 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15002 15003 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15004 15005 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Catalog` 15006 :rtype: :class:`~oci.response.Response` 15007 15008 :example: 15009 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_catalog.py.html>`__ to see an example of how to use update_catalog API. 15010 """ 15011 resource_path = "/catalogs/{catalogId}" 15012 method = "PUT" 15013 15014 # Don't accept unknown kwargs 15015 expected_kwargs = [ 15016 "retry_strategy", 15017 "if_match", 15018 "opc_request_id" 15019 ] 15020 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15021 if extra_kwargs: 15022 raise ValueError( 15023 "update_catalog got unknown kwargs: {!r}".format(extra_kwargs)) 15024 15025 path_params = { 15026 "catalogId": catalog_id 15027 } 15028 15029 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15030 15031 for (k, v) in six.iteritems(path_params): 15032 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15033 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15034 15035 header_params = { 15036 "accept": "application/json", 15037 "content-type": "application/json", 15038 "if-match": kwargs.get("if_match", missing), 15039 "opc-request-id": kwargs.get("opc_request_id", missing) 15040 } 15041 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15042 15043 retry_strategy = self.base_client.get_preferred_retry_strategy( 15044 operation_retry_strategy=kwargs.get('retry_strategy'), 15045 client_retry_strategy=self.retry_strategy 15046 ) 15047 15048 if retry_strategy: 15049 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15050 self.base_client.add_opc_client_retries_header(header_params) 15051 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15052 return retry_strategy.make_retrying_call( 15053 self.base_client.call_api, 15054 resource_path=resource_path, 15055 method=method, 15056 path_params=path_params, 15057 header_params=header_params, 15058 body=update_catalog_details, 15059 response_type="Catalog") 15060 else: 15061 return self.base_client.call_api( 15062 resource_path=resource_path, 15063 method=method, 15064 path_params=path_params, 15065 header_params=header_params, 15066 body=update_catalog_details, 15067 response_type="Catalog") 15068 15069 def update_catalog_private_endpoint(self, catalog_private_endpoint_id, update_catalog_private_endpoint_details, **kwargs): 15070 """ 15071 Updates the private reverse connection endpoint. 15072 15073 15074 :param str catalog_private_endpoint_id: (required) 15075 Unique private reverse connection identifier. 15076 15077 :param oci.data_catalog.models.UpdateCatalogPrivateEndpointDetails update_catalog_private_endpoint_details: (required) 15078 The information to be updated in private reverse connection 15079 15080 :param str if_match: (optional) 15081 For optimistic concurrency control. In the PUT or DELETE call 15082 for a resource, set the `if-match` parameter to the value of the 15083 etag from a previous GET or POST response for that resource. 15084 The resource will be updated or deleted only if the etag you 15085 provide matches the resource's current etag value. 15086 15087 :param str opc_request_id: (optional) 15088 The client request ID for tracing. 15089 15090 :param obj retry_strategy: (optional) 15091 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15092 15093 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15094 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15095 15096 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15097 15098 :return: A :class:`~oci.response.Response` object with data of type None 15099 :rtype: :class:`~oci.response.Response` 15100 15101 :example: 15102 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_catalog_private_endpoint.py.html>`__ to see an example of how to use update_catalog_private_endpoint API. 15103 """ 15104 resource_path = "/catalogPrivateEndpoints/{catalogPrivateEndpointId}" 15105 method = "PUT" 15106 15107 # Don't accept unknown kwargs 15108 expected_kwargs = [ 15109 "retry_strategy", 15110 "if_match", 15111 "opc_request_id" 15112 ] 15113 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15114 if extra_kwargs: 15115 raise ValueError( 15116 "update_catalog_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) 15117 15118 path_params = { 15119 "catalogPrivateEndpointId": catalog_private_endpoint_id 15120 } 15121 15122 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15123 15124 for (k, v) in six.iteritems(path_params): 15125 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15126 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15127 15128 header_params = { 15129 "accept": "application/json", 15130 "content-type": "application/json", 15131 "if-match": kwargs.get("if_match", missing), 15132 "opc-request-id": kwargs.get("opc_request_id", missing) 15133 } 15134 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15135 15136 retry_strategy = self.base_client.get_preferred_retry_strategy( 15137 operation_retry_strategy=kwargs.get('retry_strategy'), 15138 client_retry_strategy=self.retry_strategy 15139 ) 15140 15141 if retry_strategy: 15142 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15143 self.base_client.add_opc_client_retries_header(header_params) 15144 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15145 return retry_strategy.make_retrying_call( 15146 self.base_client.call_api, 15147 resource_path=resource_path, 15148 method=method, 15149 path_params=path_params, 15150 header_params=header_params, 15151 body=update_catalog_private_endpoint_details) 15152 else: 15153 return self.base_client.call_api( 15154 resource_path=resource_path, 15155 method=method, 15156 path_params=path_params, 15157 header_params=header_params, 15158 body=update_catalog_private_endpoint_details) 15159 15160 def update_connection(self, catalog_id, data_asset_key, connection_key, update_connection_details, **kwargs): 15161 """ 15162 Updates a specific connection of a data asset. 15163 15164 15165 :param str catalog_id: (required) 15166 Unique catalog identifier. 15167 15168 :param str data_asset_key: (required) 15169 Unique data asset key. 15170 15171 :param str connection_key: (required) 15172 Unique connection key. 15173 15174 :param oci.data_catalog.models.UpdateConnectionDetails update_connection_details: (required) 15175 The information to be updated in the connection. 15176 15177 :param str if_match: (optional) 15178 For optimistic concurrency control. In the PUT or DELETE call 15179 for a resource, set the `if-match` parameter to the value of the 15180 etag from a previous GET or POST response for that resource. 15181 The resource will be updated or deleted only if the etag you 15182 provide matches the resource's current etag value. 15183 15184 :param str opc_request_id: (optional) 15185 The client request ID for tracing. 15186 15187 :param obj retry_strategy: (optional) 15188 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15189 15190 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15191 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15192 15193 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15194 15195 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Connection` 15196 :rtype: :class:`~oci.response.Response` 15197 15198 :example: 15199 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_connection.py.html>`__ to see an example of how to use update_connection API. 15200 """ 15201 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/connections/{connectionKey}" 15202 method = "PUT" 15203 15204 # Don't accept unknown kwargs 15205 expected_kwargs = [ 15206 "retry_strategy", 15207 "if_match", 15208 "opc_request_id" 15209 ] 15210 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15211 if extra_kwargs: 15212 raise ValueError( 15213 "update_connection got unknown kwargs: {!r}".format(extra_kwargs)) 15214 15215 path_params = { 15216 "catalogId": catalog_id, 15217 "dataAssetKey": data_asset_key, 15218 "connectionKey": connection_key 15219 } 15220 15221 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15222 15223 for (k, v) in six.iteritems(path_params): 15224 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15225 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15226 15227 header_params = { 15228 "accept": "application/json", 15229 "content-type": "application/json", 15230 "if-match": kwargs.get("if_match", missing), 15231 "opc-request-id": kwargs.get("opc_request_id", missing) 15232 } 15233 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15234 15235 retry_strategy = self.base_client.get_preferred_retry_strategy( 15236 operation_retry_strategy=kwargs.get('retry_strategy'), 15237 client_retry_strategy=self.retry_strategy 15238 ) 15239 15240 if retry_strategy: 15241 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15242 self.base_client.add_opc_client_retries_header(header_params) 15243 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15244 return retry_strategy.make_retrying_call( 15245 self.base_client.call_api, 15246 resource_path=resource_path, 15247 method=method, 15248 path_params=path_params, 15249 header_params=header_params, 15250 body=update_connection_details, 15251 response_type="Connection") 15252 else: 15253 return self.base_client.call_api( 15254 resource_path=resource_path, 15255 method=method, 15256 path_params=path_params, 15257 header_params=header_params, 15258 body=update_connection_details, 15259 response_type="Connection") 15260 15261 def update_custom_property(self, catalog_id, namespace_id, custom_property_key, update_custom_property_details, **kwargs): 15262 """ 15263 Updates a specific custom property identified by the given key. 15264 15265 15266 :param str catalog_id: (required) 15267 Unique catalog identifier. 15268 15269 :param str namespace_id: (required) 15270 Unique namespace identifier. 15271 15272 :param str custom_property_key: (required) 15273 Unique Custom Property key 15274 15275 :param oci.data_catalog.models.UpdateCustomPropertyDetails update_custom_property_details: (required) 15276 The information to be updated in the custom property. 15277 15278 :param str if_match: (optional) 15279 For optimistic concurrency control. In the PUT or DELETE call 15280 for a resource, set the `if-match` parameter to the value of the 15281 etag from a previous GET or POST response for that resource. 15282 The resource will be updated or deleted only if the etag you 15283 provide matches the resource's current etag value. 15284 15285 :param str opc_request_id: (optional) 15286 The client request ID for tracing. 15287 15288 :param obj retry_strategy: (optional) 15289 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15290 15291 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15292 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15293 15294 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15295 15296 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.CustomProperty` 15297 :rtype: :class:`~oci.response.Response` 15298 15299 :example: 15300 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_custom_property.py.html>`__ to see an example of how to use update_custom_property API. 15301 """ 15302 resource_path = "/catalogs/{catalogId}/namespaces/{namespaceId}/customProperties/{customPropertyKey}" 15303 method = "PUT" 15304 15305 # Don't accept unknown kwargs 15306 expected_kwargs = [ 15307 "retry_strategy", 15308 "if_match", 15309 "opc_request_id" 15310 ] 15311 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15312 if extra_kwargs: 15313 raise ValueError( 15314 "update_custom_property got unknown kwargs: {!r}".format(extra_kwargs)) 15315 15316 path_params = { 15317 "catalogId": catalog_id, 15318 "namespaceId": namespace_id, 15319 "customPropertyKey": custom_property_key 15320 } 15321 15322 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15323 15324 for (k, v) in six.iteritems(path_params): 15325 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15326 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15327 15328 header_params = { 15329 "accept": "application/json", 15330 "content-type": "application/json", 15331 "if-match": kwargs.get("if_match", missing), 15332 "opc-request-id": kwargs.get("opc_request_id", missing) 15333 } 15334 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15335 15336 retry_strategy = self.base_client.get_preferred_retry_strategy( 15337 operation_retry_strategy=kwargs.get('retry_strategy'), 15338 client_retry_strategy=self.retry_strategy 15339 ) 15340 15341 if retry_strategy: 15342 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15343 self.base_client.add_opc_client_retries_header(header_params) 15344 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15345 return retry_strategy.make_retrying_call( 15346 self.base_client.call_api, 15347 resource_path=resource_path, 15348 method=method, 15349 path_params=path_params, 15350 header_params=header_params, 15351 body=update_custom_property_details, 15352 response_type="CustomProperty") 15353 else: 15354 return self.base_client.call_api( 15355 resource_path=resource_path, 15356 method=method, 15357 path_params=path_params, 15358 header_params=header_params, 15359 body=update_custom_property_details, 15360 response_type="CustomProperty") 15361 15362 def update_data_asset(self, catalog_id, data_asset_key, update_data_asset_details, **kwargs): 15363 """ 15364 Updates a specific data asset identified by the given key. 15365 15366 15367 :param str catalog_id: (required) 15368 Unique catalog identifier. 15369 15370 :param str data_asset_key: (required) 15371 Unique data asset key. 15372 15373 :param oci.data_catalog.models.UpdateDataAssetDetails update_data_asset_details: (required) 15374 The information to be updated in the data asset. 15375 15376 :param str if_match: (optional) 15377 For optimistic concurrency control. In the PUT or DELETE call 15378 for a resource, set the `if-match` parameter to the value of the 15379 etag from a previous GET or POST response for that resource. 15380 The resource will be updated or deleted only if the etag you 15381 provide matches the resource's current etag value. 15382 15383 :param str opc_request_id: (optional) 15384 The client request ID for tracing. 15385 15386 :param obj retry_strategy: (optional) 15387 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15388 15389 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15390 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15391 15392 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15393 15394 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.DataAsset` 15395 :rtype: :class:`~oci.response.Response` 15396 15397 :example: 15398 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_data_asset.py.html>`__ to see an example of how to use update_data_asset API. 15399 """ 15400 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}" 15401 method = "PUT" 15402 15403 # Don't accept unknown kwargs 15404 expected_kwargs = [ 15405 "retry_strategy", 15406 "if_match", 15407 "opc_request_id" 15408 ] 15409 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15410 if extra_kwargs: 15411 raise ValueError( 15412 "update_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) 15413 15414 path_params = { 15415 "catalogId": catalog_id, 15416 "dataAssetKey": data_asset_key 15417 } 15418 15419 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15420 15421 for (k, v) in six.iteritems(path_params): 15422 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15423 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15424 15425 header_params = { 15426 "accept": "application/json", 15427 "content-type": "application/json", 15428 "if-match": kwargs.get("if_match", missing), 15429 "opc-request-id": kwargs.get("opc_request_id", missing) 15430 } 15431 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15432 15433 retry_strategy = self.base_client.get_preferred_retry_strategy( 15434 operation_retry_strategy=kwargs.get('retry_strategy'), 15435 client_retry_strategy=self.retry_strategy 15436 ) 15437 15438 if retry_strategy: 15439 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15440 self.base_client.add_opc_client_retries_header(header_params) 15441 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15442 return retry_strategy.make_retrying_call( 15443 self.base_client.call_api, 15444 resource_path=resource_path, 15445 method=method, 15446 path_params=path_params, 15447 header_params=header_params, 15448 body=update_data_asset_details, 15449 response_type="DataAsset") 15450 else: 15451 return self.base_client.call_api( 15452 resource_path=resource_path, 15453 method=method, 15454 path_params=path_params, 15455 header_params=header_params, 15456 body=update_data_asset_details, 15457 response_type="DataAsset") 15458 15459 def update_entity(self, catalog_id, data_asset_key, entity_key, update_entity_details, **kwargs): 15460 """ 15461 Updates a specific data entity. 15462 15463 15464 :param str catalog_id: (required) 15465 Unique catalog identifier. 15466 15467 :param str data_asset_key: (required) 15468 Unique data asset key. 15469 15470 :param str entity_key: (required) 15471 Unique entity key. 15472 15473 :param oci.data_catalog.models.UpdateEntityDetails update_entity_details: (required) 15474 The information to be updated in the data entity. 15475 15476 :param str if_match: (optional) 15477 For optimistic concurrency control. In the PUT or DELETE call 15478 for a resource, set the `if-match` parameter to the value of the 15479 etag from a previous GET or POST response for that resource. 15480 The resource will be updated or deleted only if the etag you 15481 provide matches the resource's current etag value. 15482 15483 :param str opc_request_id: (optional) 15484 The client request ID for tracing. 15485 15486 :param obj retry_strategy: (optional) 15487 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15488 15489 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15490 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15491 15492 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15493 15494 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Entity` 15495 :rtype: :class:`~oci.response.Response` 15496 15497 :example: 15498 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_entity.py.html>`__ to see an example of how to use update_entity API. 15499 """ 15500 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}" 15501 method = "PUT" 15502 15503 # Don't accept unknown kwargs 15504 expected_kwargs = [ 15505 "retry_strategy", 15506 "if_match", 15507 "opc_request_id" 15508 ] 15509 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15510 if extra_kwargs: 15511 raise ValueError( 15512 "update_entity got unknown kwargs: {!r}".format(extra_kwargs)) 15513 15514 path_params = { 15515 "catalogId": catalog_id, 15516 "dataAssetKey": data_asset_key, 15517 "entityKey": entity_key 15518 } 15519 15520 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15521 15522 for (k, v) in six.iteritems(path_params): 15523 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15524 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15525 15526 header_params = { 15527 "accept": "application/json", 15528 "content-type": "application/json", 15529 "if-match": kwargs.get("if_match", missing), 15530 "opc-request-id": kwargs.get("opc_request_id", missing) 15531 } 15532 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15533 15534 retry_strategy = self.base_client.get_preferred_retry_strategy( 15535 operation_retry_strategy=kwargs.get('retry_strategy'), 15536 client_retry_strategy=self.retry_strategy 15537 ) 15538 15539 if retry_strategy: 15540 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15541 self.base_client.add_opc_client_retries_header(header_params) 15542 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15543 return retry_strategy.make_retrying_call( 15544 self.base_client.call_api, 15545 resource_path=resource_path, 15546 method=method, 15547 path_params=path_params, 15548 header_params=header_params, 15549 body=update_entity_details, 15550 response_type="Entity") 15551 else: 15552 return self.base_client.call_api( 15553 resource_path=resource_path, 15554 method=method, 15555 path_params=path_params, 15556 header_params=header_params, 15557 body=update_entity_details, 15558 response_type="Entity") 15559 15560 def update_folder(self, catalog_id, data_asset_key, folder_key, update_folder_details, **kwargs): 15561 """ 15562 Updates a specific folder of a data asset. 15563 15564 15565 :param str catalog_id: (required) 15566 Unique catalog identifier. 15567 15568 :param str data_asset_key: (required) 15569 Unique data asset key. 15570 15571 :param str folder_key: (required) 15572 Unique folder key. 15573 15574 :param oci.data_catalog.models.UpdateFolderDetails update_folder_details: (required) 15575 The information to be updated in the folder. 15576 15577 :param str if_match: (optional) 15578 For optimistic concurrency control. In the PUT or DELETE call 15579 for a resource, set the `if-match` parameter to the value of the 15580 etag from a previous GET or POST response for that resource. 15581 The resource will be updated or deleted only if the etag you 15582 provide matches the resource's current etag value. 15583 15584 :param str opc_request_id: (optional) 15585 The client request ID for tracing. 15586 15587 :param obj retry_strategy: (optional) 15588 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15589 15590 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15591 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15592 15593 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15594 15595 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Folder` 15596 :rtype: :class:`~oci.response.Response` 15597 15598 :example: 15599 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_folder.py.html>`__ to see an example of how to use update_folder API. 15600 """ 15601 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/folders/{folderKey}" 15602 method = "PUT" 15603 15604 # Don't accept unknown kwargs 15605 expected_kwargs = [ 15606 "retry_strategy", 15607 "if_match", 15608 "opc_request_id" 15609 ] 15610 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15611 if extra_kwargs: 15612 raise ValueError( 15613 "update_folder got unknown kwargs: {!r}".format(extra_kwargs)) 15614 15615 path_params = { 15616 "catalogId": catalog_id, 15617 "dataAssetKey": data_asset_key, 15618 "folderKey": folder_key 15619 } 15620 15621 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15622 15623 for (k, v) in six.iteritems(path_params): 15624 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15625 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15626 15627 header_params = { 15628 "accept": "application/json", 15629 "content-type": "application/json", 15630 "if-match": kwargs.get("if_match", missing), 15631 "opc-request-id": kwargs.get("opc_request_id", missing) 15632 } 15633 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15634 15635 retry_strategy = self.base_client.get_preferred_retry_strategy( 15636 operation_retry_strategy=kwargs.get('retry_strategy'), 15637 client_retry_strategy=self.retry_strategy 15638 ) 15639 15640 if retry_strategy: 15641 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15642 self.base_client.add_opc_client_retries_header(header_params) 15643 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15644 return retry_strategy.make_retrying_call( 15645 self.base_client.call_api, 15646 resource_path=resource_path, 15647 method=method, 15648 path_params=path_params, 15649 header_params=header_params, 15650 body=update_folder_details, 15651 response_type="Folder") 15652 else: 15653 return self.base_client.call_api( 15654 resource_path=resource_path, 15655 method=method, 15656 path_params=path_params, 15657 header_params=header_params, 15658 body=update_folder_details, 15659 response_type="Folder") 15660 15661 def update_glossary(self, catalog_id, glossary_key, update_glossary_details, **kwargs): 15662 """ 15663 Updates a specific glossary identified by the given key. 15664 15665 15666 :param str catalog_id: (required) 15667 Unique catalog identifier. 15668 15669 :param str glossary_key: (required) 15670 Unique glossary key. 15671 15672 :param oci.data_catalog.models.UpdateGlossaryDetails update_glossary_details: (required) 15673 The information to be updated in the glossary. 15674 15675 :param str if_match: (optional) 15676 For optimistic concurrency control. In the PUT or DELETE call 15677 for a resource, set the `if-match` parameter to the value of the 15678 etag from a previous GET or POST response for that resource. 15679 The resource will be updated or deleted only if the etag you 15680 provide matches the resource's current etag value. 15681 15682 :param str opc_request_id: (optional) 15683 The client request ID for tracing. 15684 15685 :param obj retry_strategy: (optional) 15686 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15687 15688 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15689 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15690 15691 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15692 15693 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Glossary` 15694 :rtype: :class:`~oci.response.Response` 15695 15696 :example: 15697 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_glossary.py.html>`__ to see an example of how to use update_glossary API. 15698 """ 15699 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}" 15700 method = "PUT" 15701 15702 # Don't accept unknown kwargs 15703 expected_kwargs = [ 15704 "retry_strategy", 15705 "if_match", 15706 "opc_request_id" 15707 ] 15708 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15709 if extra_kwargs: 15710 raise ValueError( 15711 "update_glossary got unknown kwargs: {!r}".format(extra_kwargs)) 15712 15713 path_params = { 15714 "catalogId": catalog_id, 15715 "glossaryKey": glossary_key 15716 } 15717 15718 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15719 15720 for (k, v) in six.iteritems(path_params): 15721 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15722 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15723 15724 header_params = { 15725 "accept": "application/json", 15726 "content-type": "application/json", 15727 "if-match": kwargs.get("if_match", missing), 15728 "opc-request-id": kwargs.get("opc_request_id", missing) 15729 } 15730 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15731 15732 retry_strategy = self.base_client.get_preferred_retry_strategy( 15733 operation_retry_strategy=kwargs.get('retry_strategy'), 15734 client_retry_strategy=self.retry_strategy 15735 ) 15736 15737 if retry_strategy: 15738 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15739 self.base_client.add_opc_client_retries_header(header_params) 15740 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15741 return retry_strategy.make_retrying_call( 15742 self.base_client.call_api, 15743 resource_path=resource_path, 15744 method=method, 15745 path_params=path_params, 15746 header_params=header_params, 15747 body=update_glossary_details, 15748 response_type="Glossary") 15749 else: 15750 return self.base_client.call_api( 15751 resource_path=resource_path, 15752 method=method, 15753 path_params=path_params, 15754 header_params=header_params, 15755 body=update_glossary_details, 15756 response_type="Glossary") 15757 15758 def update_job(self, catalog_id, job_key, update_job_details, **kwargs): 15759 """ 15760 Updates a specific job identified by the given key. 15761 15762 15763 :param str catalog_id: (required) 15764 Unique catalog identifier. 15765 15766 :param str job_key: (required) 15767 Unique job key. 15768 15769 :param oci.data_catalog.models.UpdateJobDetails update_job_details: (required) 15770 The information to be updated in the job. 15771 15772 :param str if_match: (optional) 15773 For optimistic concurrency control. In the PUT or DELETE call 15774 for a resource, set the `if-match` parameter to the value of the 15775 etag from a previous GET or POST response for that resource. 15776 The resource will be updated or deleted only if the etag you 15777 provide matches the resource's current etag value. 15778 15779 :param str opc_request_id: (optional) 15780 The client request ID for tracing. 15781 15782 :param obj retry_strategy: (optional) 15783 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15784 15785 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15786 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15787 15788 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15789 15790 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Job` 15791 :rtype: :class:`~oci.response.Response` 15792 15793 :example: 15794 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_job.py.html>`__ to see an example of how to use update_job API. 15795 """ 15796 resource_path = "/catalogs/{catalogId}/jobs/{jobKey}" 15797 method = "PUT" 15798 15799 # Don't accept unknown kwargs 15800 expected_kwargs = [ 15801 "retry_strategy", 15802 "if_match", 15803 "opc_request_id" 15804 ] 15805 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15806 if extra_kwargs: 15807 raise ValueError( 15808 "update_job got unknown kwargs: {!r}".format(extra_kwargs)) 15809 15810 path_params = { 15811 "catalogId": catalog_id, 15812 "jobKey": job_key 15813 } 15814 15815 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15816 15817 for (k, v) in six.iteritems(path_params): 15818 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15819 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15820 15821 header_params = { 15822 "accept": "application/json", 15823 "content-type": "application/json", 15824 "if-match": kwargs.get("if_match", missing), 15825 "opc-request-id": kwargs.get("opc_request_id", missing) 15826 } 15827 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15828 15829 retry_strategy = self.base_client.get_preferred_retry_strategy( 15830 operation_retry_strategy=kwargs.get('retry_strategy'), 15831 client_retry_strategy=self.retry_strategy 15832 ) 15833 15834 if retry_strategy: 15835 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15836 self.base_client.add_opc_client_retries_header(header_params) 15837 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15838 return retry_strategy.make_retrying_call( 15839 self.base_client.call_api, 15840 resource_path=resource_path, 15841 method=method, 15842 path_params=path_params, 15843 header_params=header_params, 15844 body=update_job_details, 15845 response_type="Job") 15846 else: 15847 return self.base_client.call_api( 15848 resource_path=resource_path, 15849 method=method, 15850 path_params=path_params, 15851 header_params=header_params, 15852 body=update_job_details, 15853 response_type="Job") 15854 15855 def update_job_definition(self, catalog_id, job_definition_key, update_job_definition_details, **kwargs): 15856 """ 15857 Update a specific job definition identified by the given key. 15858 15859 15860 :param str catalog_id: (required) 15861 Unique catalog identifier. 15862 15863 :param str job_definition_key: (required) 15864 Unique job definition key. 15865 15866 :param oci.data_catalog.models.UpdateJobDefinitionDetails update_job_definition_details: (required) 15867 The information to be updated in the job definition. 15868 15869 :param str if_match: (optional) 15870 For optimistic concurrency control. In the PUT or DELETE call 15871 for a resource, set the `if-match` parameter to the value of the 15872 etag from a previous GET or POST response for that resource. 15873 The resource will be updated or deleted only if the etag you 15874 provide matches the resource's current etag value. 15875 15876 :param str opc_request_id: (optional) 15877 The client request ID for tracing. 15878 15879 :param obj retry_strategy: (optional) 15880 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15881 15882 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15883 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15884 15885 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15886 15887 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.JobDefinition` 15888 :rtype: :class:`~oci.response.Response` 15889 15890 :example: 15891 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_job_definition.py.html>`__ to see an example of how to use update_job_definition API. 15892 """ 15893 resource_path = "/catalogs/{catalogId}/jobDefinitions/{jobDefinitionKey}" 15894 method = "PUT" 15895 15896 # Don't accept unknown kwargs 15897 expected_kwargs = [ 15898 "retry_strategy", 15899 "if_match", 15900 "opc_request_id" 15901 ] 15902 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15903 if extra_kwargs: 15904 raise ValueError( 15905 "update_job_definition got unknown kwargs: {!r}".format(extra_kwargs)) 15906 15907 path_params = { 15908 "catalogId": catalog_id, 15909 "jobDefinitionKey": job_definition_key 15910 } 15911 15912 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 15913 15914 for (k, v) in six.iteritems(path_params): 15915 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 15916 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 15917 15918 header_params = { 15919 "accept": "application/json", 15920 "content-type": "application/json", 15921 "if-match": kwargs.get("if_match", missing), 15922 "opc-request-id": kwargs.get("opc_request_id", missing) 15923 } 15924 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 15925 15926 retry_strategy = self.base_client.get_preferred_retry_strategy( 15927 operation_retry_strategy=kwargs.get('retry_strategy'), 15928 client_retry_strategy=self.retry_strategy 15929 ) 15930 15931 if retry_strategy: 15932 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 15933 self.base_client.add_opc_client_retries_header(header_params) 15934 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 15935 return retry_strategy.make_retrying_call( 15936 self.base_client.call_api, 15937 resource_path=resource_path, 15938 method=method, 15939 path_params=path_params, 15940 header_params=header_params, 15941 body=update_job_definition_details, 15942 response_type="JobDefinition") 15943 else: 15944 return self.base_client.call_api( 15945 resource_path=resource_path, 15946 method=method, 15947 path_params=path_params, 15948 header_params=header_params, 15949 body=update_job_definition_details, 15950 response_type="JobDefinition") 15951 15952 def update_metastore(self, metastore_id, update_metastore_details, **kwargs): 15953 """ 15954 Updates a metastore resource by identifier. 15955 15956 15957 :param str metastore_id: (required) 15958 The metastore's OCID. 15959 15960 :param oci.data_catalog.models.UpdateMetastoreDetails update_metastore_details: (required) 15961 The metastore information to be updated. 15962 15963 :param str if_match: (optional) 15964 For optimistic concurrency control. In the PUT or DELETE call 15965 for a resource, set the `if-match` parameter to the value of the 15966 etag from a previous GET or POST response for that resource. 15967 The resource will be updated or deleted only if the etag you 15968 provide matches the resource's current etag value. 15969 15970 :param str opc_request_id: (optional) 15971 The client request ID for tracing. 15972 15973 :param obj retry_strategy: (optional) 15974 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 15975 15976 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 15977 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 15978 15979 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 15980 15981 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Metastore` 15982 :rtype: :class:`~oci.response.Response` 15983 15984 :example: 15985 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_metastore.py.html>`__ to see an example of how to use update_metastore API. 15986 """ 15987 resource_path = "/metastores/{metastoreId}" 15988 method = "PUT" 15989 15990 # Don't accept unknown kwargs 15991 expected_kwargs = [ 15992 "retry_strategy", 15993 "if_match", 15994 "opc_request_id" 15995 ] 15996 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 15997 if extra_kwargs: 15998 raise ValueError( 15999 "update_metastore got unknown kwargs: {!r}".format(extra_kwargs)) 16000 16001 path_params = { 16002 "metastoreId": metastore_id 16003 } 16004 16005 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 16006 16007 for (k, v) in six.iteritems(path_params): 16008 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 16009 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 16010 16011 header_params = { 16012 "accept": "application/json", 16013 "content-type": "application/json", 16014 "if-match": kwargs.get("if_match", missing), 16015 "opc-request-id": kwargs.get("opc_request_id", missing) 16016 } 16017 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16018 16019 retry_strategy = self.base_client.get_preferred_retry_strategy( 16020 operation_retry_strategy=kwargs.get('retry_strategy'), 16021 client_retry_strategy=self.retry_strategy 16022 ) 16023 16024 if retry_strategy: 16025 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16026 self.base_client.add_opc_client_retries_header(header_params) 16027 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16028 return retry_strategy.make_retrying_call( 16029 self.base_client.call_api, 16030 resource_path=resource_path, 16031 method=method, 16032 path_params=path_params, 16033 header_params=header_params, 16034 body=update_metastore_details, 16035 response_type="Metastore") 16036 else: 16037 return self.base_client.call_api( 16038 resource_path=resource_path, 16039 method=method, 16040 path_params=path_params, 16041 header_params=header_params, 16042 body=update_metastore_details, 16043 response_type="Metastore") 16044 16045 def update_namespace(self, catalog_id, namespace_id, update_namespace_details, **kwargs): 16046 """ 16047 Updates a specific namespace identified by the given key. 16048 16049 16050 :param str catalog_id: (required) 16051 Unique catalog identifier. 16052 16053 :param str namespace_id: (required) 16054 Unique namespace identifier. 16055 16056 :param oci.data_catalog.models.UpdateNamespaceDetails update_namespace_details: (required) 16057 The information to be updated in the namespace. 16058 16059 :param str if_match: (optional) 16060 For optimistic concurrency control. In the PUT or DELETE call 16061 for a resource, set the `if-match` parameter to the value of the 16062 etag from a previous GET or POST response for that resource. 16063 The resource will be updated or deleted only if the etag you 16064 provide matches the resource's current etag value. 16065 16066 :param str opc_request_id: (optional) 16067 The client request ID for tracing. 16068 16069 :param obj retry_strategy: (optional) 16070 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16071 16072 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 16073 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16074 16075 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16076 16077 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Namespace` 16078 :rtype: :class:`~oci.response.Response` 16079 16080 :example: 16081 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_namespace.py.html>`__ to see an example of how to use update_namespace API. 16082 """ 16083 resource_path = "/catalogs/{catalogId}/namespaces/{namespaceId}" 16084 method = "PUT" 16085 16086 # Don't accept unknown kwargs 16087 expected_kwargs = [ 16088 "retry_strategy", 16089 "if_match", 16090 "opc_request_id" 16091 ] 16092 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16093 if extra_kwargs: 16094 raise ValueError( 16095 "update_namespace got unknown kwargs: {!r}".format(extra_kwargs)) 16096 16097 path_params = { 16098 "catalogId": catalog_id, 16099 "namespaceId": namespace_id 16100 } 16101 16102 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 16103 16104 for (k, v) in six.iteritems(path_params): 16105 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 16106 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 16107 16108 header_params = { 16109 "accept": "application/json", 16110 "content-type": "application/json", 16111 "if-match": kwargs.get("if_match", missing), 16112 "opc-request-id": kwargs.get("opc_request_id", missing) 16113 } 16114 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16115 16116 retry_strategy = self.base_client.get_preferred_retry_strategy( 16117 operation_retry_strategy=kwargs.get('retry_strategy'), 16118 client_retry_strategy=self.retry_strategy 16119 ) 16120 16121 if retry_strategy: 16122 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16123 self.base_client.add_opc_client_retries_header(header_params) 16124 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16125 return retry_strategy.make_retrying_call( 16126 self.base_client.call_api, 16127 resource_path=resource_path, 16128 method=method, 16129 path_params=path_params, 16130 header_params=header_params, 16131 body=update_namespace_details, 16132 response_type="Namespace") 16133 else: 16134 return self.base_client.call_api( 16135 resource_path=resource_path, 16136 method=method, 16137 path_params=path_params, 16138 header_params=header_params, 16139 body=update_namespace_details, 16140 response_type="Namespace") 16141 16142 def update_pattern(self, catalog_id, pattern_key, update_pattern_details, **kwargs): 16143 """ 16144 Updates a specific pattern identified by the given key. 16145 16146 16147 :param str catalog_id: (required) 16148 Unique catalog identifier. 16149 16150 :param str pattern_key: (required) 16151 Unique pattern key. 16152 16153 :param oci.data_catalog.models.UpdatePatternDetails update_pattern_details: (required) 16154 The information to be updated in the pattern. 16155 16156 :param str if_match: (optional) 16157 For optimistic concurrency control. In the PUT or DELETE call 16158 for a resource, set the `if-match` parameter to the value of the 16159 etag from a previous GET or POST response for that resource. 16160 The resource will be updated or deleted only if the etag you 16161 provide matches the resource's current etag value. 16162 16163 :param str opc_request_id: (optional) 16164 The client request ID for tracing. 16165 16166 :param obj retry_strategy: (optional) 16167 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16168 16169 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 16170 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16171 16172 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16173 16174 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Pattern` 16175 :rtype: :class:`~oci.response.Response` 16176 16177 :example: 16178 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_pattern.py.html>`__ to see an example of how to use update_pattern API. 16179 """ 16180 resource_path = "/catalogs/{catalogId}/patterns/{patternKey}" 16181 method = "PUT" 16182 16183 # Don't accept unknown kwargs 16184 expected_kwargs = [ 16185 "retry_strategy", 16186 "if_match", 16187 "opc_request_id" 16188 ] 16189 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16190 if extra_kwargs: 16191 raise ValueError( 16192 "update_pattern got unknown kwargs: {!r}".format(extra_kwargs)) 16193 16194 path_params = { 16195 "catalogId": catalog_id, 16196 "patternKey": pattern_key 16197 } 16198 16199 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 16200 16201 for (k, v) in six.iteritems(path_params): 16202 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 16203 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 16204 16205 header_params = { 16206 "accept": "application/json", 16207 "content-type": "application/json", 16208 "if-match": kwargs.get("if_match", missing), 16209 "opc-request-id": kwargs.get("opc_request_id", missing) 16210 } 16211 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16212 16213 retry_strategy = self.base_client.get_preferred_retry_strategy( 16214 operation_retry_strategy=kwargs.get('retry_strategy'), 16215 client_retry_strategy=self.retry_strategy 16216 ) 16217 16218 if retry_strategy: 16219 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16220 self.base_client.add_opc_client_retries_header(header_params) 16221 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16222 return retry_strategy.make_retrying_call( 16223 self.base_client.call_api, 16224 resource_path=resource_path, 16225 method=method, 16226 path_params=path_params, 16227 header_params=header_params, 16228 body=update_pattern_details, 16229 response_type="Pattern") 16230 else: 16231 return self.base_client.call_api( 16232 resource_path=resource_path, 16233 method=method, 16234 path_params=path_params, 16235 header_params=header_params, 16236 body=update_pattern_details, 16237 response_type="Pattern") 16238 16239 def update_term(self, catalog_id, glossary_key, term_key, update_term_details, **kwargs): 16240 """ 16241 Updates a specific glossary term. 16242 16243 16244 :param str catalog_id: (required) 16245 Unique catalog identifier. 16246 16247 :param str glossary_key: (required) 16248 Unique glossary key. 16249 16250 :param str term_key: (required) 16251 Unique glossary term key. 16252 16253 :param oci.data_catalog.models.UpdateTermDetails update_term_details: (required) 16254 The information to be updated in the term. 16255 16256 :param str if_match: (optional) 16257 For optimistic concurrency control. In the PUT or DELETE call 16258 for a resource, set the `if-match` parameter to the value of the 16259 etag from a previous GET or POST response for that resource. 16260 The resource will be updated or deleted only if the etag you 16261 provide matches the resource's current etag value. 16262 16263 :param str opc_request_id: (optional) 16264 The client request ID for tracing. 16265 16266 :param obj retry_strategy: (optional) 16267 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16268 16269 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 16270 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16271 16272 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16273 16274 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Term` 16275 :rtype: :class:`~oci.response.Response` 16276 16277 :example: 16278 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_term.py.html>`__ to see an example of how to use update_term API. 16279 """ 16280 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms/{termKey}" 16281 method = "PUT" 16282 16283 # Don't accept unknown kwargs 16284 expected_kwargs = [ 16285 "retry_strategy", 16286 "if_match", 16287 "opc_request_id" 16288 ] 16289 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16290 if extra_kwargs: 16291 raise ValueError( 16292 "update_term got unknown kwargs: {!r}".format(extra_kwargs)) 16293 16294 path_params = { 16295 "catalogId": catalog_id, 16296 "glossaryKey": glossary_key, 16297 "termKey": term_key 16298 } 16299 16300 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 16301 16302 for (k, v) in six.iteritems(path_params): 16303 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 16304 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 16305 16306 header_params = { 16307 "accept": "application/json", 16308 "content-type": "application/json", 16309 "if-match": kwargs.get("if_match", missing), 16310 "opc-request-id": kwargs.get("opc_request_id", missing) 16311 } 16312 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16313 16314 retry_strategy = self.base_client.get_preferred_retry_strategy( 16315 operation_retry_strategy=kwargs.get('retry_strategy'), 16316 client_retry_strategy=self.retry_strategy 16317 ) 16318 16319 if retry_strategy: 16320 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16321 self.base_client.add_opc_client_retries_header(header_params) 16322 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16323 return retry_strategy.make_retrying_call( 16324 self.base_client.call_api, 16325 resource_path=resource_path, 16326 method=method, 16327 path_params=path_params, 16328 header_params=header_params, 16329 body=update_term_details, 16330 response_type="Term") 16331 else: 16332 return self.base_client.call_api( 16333 resource_path=resource_path, 16334 method=method, 16335 path_params=path_params, 16336 header_params=header_params, 16337 body=update_term_details, 16338 response_type="Term") 16339 16340 def update_term_relationship(self, catalog_id, glossary_key, term_key, term_relationship_key, update_term_relationship_details, **kwargs): 16341 """ 16342 Updates a specific glossary term relationship. 16343 16344 16345 :param str catalog_id: (required) 16346 Unique catalog identifier. 16347 16348 :param str glossary_key: (required) 16349 Unique glossary key. 16350 16351 :param str term_key: (required) 16352 Unique glossary term key. 16353 16354 :param str term_relationship_key: (required) 16355 Unique glossary term relationship key. 16356 16357 :param oci.data_catalog.models.UpdateTermRelationshipDetails update_term_relationship_details: (required) 16358 The information to be updated in the term relationship. 16359 16360 :param str if_match: (optional) 16361 For optimistic concurrency control. In the PUT or DELETE call 16362 for a resource, set the `if-match` parameter to the value of the 16363 etag from a previous GET or POST response for that resource. 16364 The resource will be updated or deleted only if the etag you 16365 provide matches the resource's current etag value. 16366 16367 :param str opc_request_id: (optional) 16368 The client request ID for tracing. 16369 16370 :param obj retry_strategy: (optional) 16371 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16372 16373 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 16374 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16375 16376 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16377 16378 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.TermRelationship` 16379 :rtype: :class:`~oci.response.Response` 16380 16381 :example: 16382 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/update_term_relationship.py.html>`__ to see an example of how to use update_term_relationship API. 16383 """ 16384 resource_path = "/catalogs/{catalogId}/glossaries/{glossaryKey}/terms/{termKey}/termRelationships/{termRelationshipKey}" 16385 method = "PUT" 16386 16387 # Don't accept unknown kwargs 16388 expected_kwargs = [ 16389 "retry_strategy", 16390 "if_match", 16391 "opc_request_id" 16392 ] 16393 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16394 if extra_kwargs: 16395 raise ValueError( 16396 "update_term_relationship got unknown kwargs: {!r}".format(extra_kwargs)) 16397 16398 path_params = { 16399 "catalogId": catalog_id, 16400 "glossaryKey": glossary_key, 16401 "termKey": term_key, 16402 "termRelationshipKey": term_relationship_key 16403 } 16404 16405 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 16406 16407 for (k, v) in six.iteritems(path_params): 16408 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 16409 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 16410 16411 header_params = { 16412 "accept": "application/json", 16413 "content-type": "application/json", 16414 "if-match": kwargs.get("if_match", missing), 16415 "opc-request-id": kwargs.get("opc_request_id", missing) 16416 } 16417 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16418 16419 retry_strategy = self.base_client.get_preferred_retry_strategy( 16420 operation_retry_strategy=kwargs.get('retry_strategy'), 16421 client_retry_strategy=self.retry_strategy 16422 ) 16423 16424 if retry_strategy: 16425 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16426 self.base_client.add_opc_client_retries_header(header_params) 16427 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16428 return retry_strategy.make_retrying_call( 16429 self.base_client.call_api, 16430 resource_path=resource_path, 16431 method=method, 16432 path_params=path_params, 16433 header_params=header_params, 16434 body=update_term_relationship_details, 16435 response_type="TermRelationship") 16436 else: 16437 return self.base_client.call_api( 16438 resource_path=resource_path, 16439 method=method, 16440 path_params=path_params, 16441 header_params=header_params, 16442 body=update_term_relationship_details, 16443 response_type="TermRelationship") 16444 16445 def upload_credentials(self, catalog_id, data_asset_key, connection_key, upload_credentials_details, **kwargs): 16446 """ 16447 Upload connection credentails and metadata for this connection. 16448 16449 16450 :param str catalog_id: (required) 16451 Unique catalog identifier. 16452 16453 :param str data_asset_key: (required) 16454 Unique data asset key. 16455 16456 :param str connection_key: (required) 16457 Unique connection key. 16458 16459 :param oci.data_catalog.models.UploadCredentialsDetails upload_credentials_details: (required) 16460 The information used to upload the credentials file and metadata for updating this connection. 16461 16462 :param str opc_request_id: (optional) 16463 The client request ID for tracing. 16464 16465 :param str if_match: (optional) 16466 For optimistic concurrency control. In the PUT or DELETE call 16467 for a resource, set the `if-match` parameter to the value of the 16468 etag from a previous GET or POST response for that resource. 16469 The resource will be updated or deleted only if the etag you 16470 provide matches the resource's current etag value. 16471 16472 :param str opc_retry_token: (optional) 16473 A token that uniquely identifies a request so it can be retried in case of a timeout or 16474 server error without risk of executing that same action again. Retry tokens expire after 24 16475 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 16476 has been deleted and purged from the system, then a retry of the original creation request 16477 might be rejected. 16478 16479 :param obj retry_strategy: (optional) 16480 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16481 16482 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. 16483 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16484 16485 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16486 16487 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.Connection` 16488 :rtype: :class:`~oci.response.Response` 16489 16490 :example: 16491 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/upload_credentials.py.html>`__ to see an example of how to use upload_credentials API. 16492 """ 16493 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/connections/{connectionKey}/actions/uploadCredentials" 16494 method = "POST" 16495 16496 # Don't accept unknown kwargs 16497 expected_kwargs = [ 16498 "retry_strategy", 16499 "opc_request_id", 16500 "if_match", 16501 "opc_retry_token" 16502 ] 16503 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16504 if extra_kwargs: 16505 raise ValueError( 16506 "upload_credentials got unknown kwargs: {!r}".format(extra_kwargs)) 16507 16508 path_params = { 16509 "catalogId": catalog_id, 16510 "dataAssetKey": data_asset_key, 16511 "connectionKey": connection_key 16512 } 16513 16514 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 16515 16516 for (k, v) in six.iteritems(path_params): 16517 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 16518 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 16519 16520 header_params = { 16521 "accept": "application/json", 16522 "content-type": "application/json", 16523 "opc-request-id": kwargs.get("opc_request_id", missing), 16524 "if-match": kwargs.get("if_match", missing), 16525 "opc-retry-token": kwargs.get("opc_retry_token", missing) 16526 } 16527 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16528 16529 retry_strategy = self.base_client.get_preferred_retry_strategy( 16530 operation_retry_strategy=kwargs.get('retry_strategy'), 16531 client_retry_strategy=self.retry_strategy 16532 ) 16533 16534 if retry_strategy: 16535 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16536 self.base_client.add_opc_retry_token_if_needed(header_params) 16537 self.base_client.add_opc_client_retries_header(header_params) 16538 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16539 return retry_strategy.make_retrying_call( 16540 self.base_client.call_api, 16541 resource_path=resource_path, 16542 method=method, 16543 path_params=path_params, 16544 header_params=header_params, 16545 body=upload_credentials_details, 16546 response_type="Connection") 16547 else: 16548 return self.base_client.call_api( 16549 resource_path=resource_path, 16550 method=method, 16551 path_params=path_params, 16552 header_params=header_params, 16553 body=upload_credentials_details, 16554 response_type="Connection") 16555 16556 def users(self, catalog_id, **kwargs): 16557 """ 16558 Returns active users in the system. 16559 16560 16561 :param str catalog_id: (required) 16562 Unique catalog identifier. 16563 16564 :param str sort_by: (optional) 16565 The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. 16566 16567 Allowed values are: "TIMECREATED", "DISPLAYNAME" 16568 16569 :param str sort_order: (optional) 16570 The sort order to use, either 'asc' or 'desc'. 16571 16572 Allowed values are: "ASC", "DESC" 16573 16574 :param int limit: (optional) 16575 The maximum number of items to return. 16576 16577 :param str page: (optional) 16578 The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. 16579 16580 :param str opc_request_id: (optional) 16581 The client request ID for tracing. 16582 16583 :param obj retry_strategy: (optional) 16584 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16585 16586 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 16587 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16588 16589 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16590 16591 :return: A :class:`~oci.response.Response` object with data of type str 16592 :rtype: :class:`~oci.response.Response` 16593 16594 :example: 16595 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/users.py.html>`__ to see an example of how to use users API. 16596 """ 16597 resource_path = "/catalogs/{catalogId}/actions/users" 16598 method = "POST" 16599 16600 # Don't accept unknown kwargs 16601 expected_kwargs = [ 16602 "retry_strategy", 16603 "sort_by", 16604 "sort_order", 16605 "limit", 16606 "page", 16607 "opc_request_id" 16608 ] 16609 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16610 if extra_kwargs: 16611 raise ValueError( 16612 "users got unknown kwargs: {!r}".format(extra_kwargs)) 16613 16614 path_params = { 16615 "catalogId": catalog_id 16616 } 16617 16618 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 16619 16620 for (k, v) in six.iteritems(path_params): 16621 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 16622 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 16623 16624 if 'sort_by' in kwargs: 16625 sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] 16626 if kwargs['sort_by'] not in sort_by_allowed_values: 16627 raise ValueError( 16628 "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) 16629 ) 16630 16631 if 'sort_order' in kwargs: 16632 sort_order_allowed_values = ["ASC", "DESC"] 16633 if kwargs['sort_order'] not in sort_order_allowed_values: 16634 raise ValueError( 16635 "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) 16636 ) 16637 16638 query_params = { 16639 "sortBy": kwargs.get("sort_by", missing), 16640 "sortOrder": kwargs.get("sort_order", missing), 16641 "limit": kwargs.get("limit", missing), 16642 "page": kwargs.get("page", missing) 16643 } 16644 query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} 16645 16646 header_params = { 16647 "accept": "application/json", 16648 "content-type": "application/json", 16649 "opc-request-id": kwargs.get("opc_request_id", missing) 16650 } 16651 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16652 16653 retry_strategy = self.base_client.get_preferred_retry_strategy( 16654 operation_retry_strategy=kwargs.get('retry_strategy'), 16655 client_retry_strategy=self.retry_strategy 16656 ) 16657 if retry_strategy is None: 16658 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 16659 16660 if retry_strategy: 16661 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16662 self.base_client.add_opc_client_retries_header(header_params) 16663 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16664 return retry_strategy.make_retrying_call( 16665 self.base_client.call_api, 16666 resource_path=resource_path, 16667 method=method, 16668 path_params=path_params, 16669 query_params=query_params, 16670 header_params=header_params, 16671 response_type="str") 16672 else: 16673 return self.base_client.call_api( 16674 resource_path=resource_path, 16675 method=method, 16676 path_params=path_params, 16677 query_params=query_params, 16678 header_params=header_params, 16679 response_type="str") 16680 16681 def validate_connection(self, catalog_id, data_asset_key, validate_connection_details, **kwargs): 16682 """ 16683 Validate connection by connecting to the data asset using credentials in metadata. 16684 16685 16686 :param str catalog_id: (required) 16687 Unique catalog identifier. 16688 16689 :param str data_asset_key: (required) 16690 Unique data asset key. 16691 16692 :param oci.data_catalog.models.ValidateConnectionDetails validate_connection_details: (required) 16693 The information used to validate the connections. 16694 16695 :param str opc_request_id: (optional) 16696 The client request ID for tracing. 16697 16698 :param str opc_retry_token: (optional) 16699 A token that uniquely identifies a request so it can be retried in case of a timeout or 16700 server error without risk of executing that same action again. Retry tokens expire after 24 16701 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 16702 has been deleted and purged from the system, then a retry of the original creation request 16703 might be rejected. 16704 16705 :param obj retry_strategy: (optional) 16706 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16707 16708 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 16709 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16710 16711 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16712 16713 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.ValidateConnectionResult` 16714 :rtype: :class:`~oci.response.Response` 16715 16716 :example: 16717 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/validate_connection.py.html>`__ to see an example of how to use validate_connection API. 16718 """ 16719 resource_path = "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/actions/validateConnection" 16720 method = "POST" 16721 16722 # Don't accept unknown kwargs 16723 expected_kwargs = [ 16724 "retry_strategy", 16725 "opc_request_id", 16726 "opc_retry_token" 16727 ] 16728 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16729 if extra_kwargs: 16730 raise ValueError( 16731 "validate_connection got unknown kwargs: {!r}".format(extra_kwargs)) 16732 16733 path_params = { 16734 "catalogId": catalog_id, 16735 "dataAssetKey": data_asset_key 16736 } 16737 16738 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 16739 16740 for (k, v) in six.iteritems(path_params): 16741 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 16742 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 16743 16744 header_params = { 16745 "accept": "application/json", 16746 "content-type": "application/json", 16747 "opc-request-id": kwargs.get("opc_request_id", missing), 16748 "opc-retry-token": kwargs.get("opc_retry_token", missing) 16749 } 16750 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16751 16752 retry_strategy = self.base_client.get_preferred_retry_strategy( 16753 operation_retry_strategy=kwargs.get('retry_strategy'), 16754 client_retry_strategy=self.retry_strategy 16755 ) 16756 if retry_strategy is None: 16757 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 16758 16759 if retry_strategy: 16760 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16761 self.base_client.add_opc_retry_token_if_needed(header_params) 16762 self.base_client.add_opc_client_retries_header(header_params) 16763 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16764 return retry_strategy.make_retrying_call( 16765 self.base_client.call_api, 16766 resource_path=resource_path, 16767 method=method, 16768 path_params=path_params, 16769 header_params=header_params, 16770 body=validate_connection_details, 16771 response_type="ValidateConnectionResult") 16772 else: 16773 return self.base_client.call_api( 16774 resource_path=resource_path, 16775 method=method, 16776 path_params=path_params, 16777 header_params=header_params, 16778 body=validate_connection_details, 16779 response_type="ValidateConnectionResult") 16780 16781 def validate_pattern(self, catalog_id, pattern_key, validate_pattern_details, **kwargs): 16782 """ 16783 Validate pattern by deriving file groups representing logical entities using the expression 16784 16785 16786 :param str catalog_id: (required) 16787 Unique catalog identifier. 16788 16789 :param str pattern_key: (required) 16790 Unique pattern key. 16791 16792 :param oci.data_catalog.models.ValidatePatternDetails validate_pattern_details: (required) 16793 The information used to validate the pattern. 16794 16795 :param str opc_request_id: (optional) 16796 The client request ID for tracing. 16797 16798 :param str opc_retry_token: (optional) 16799 A token that uniquely identifies a request so it can be retried in case of a timeout or 16800 server error without risk of executing that same action again. Retry tokens expire after 24 16801 hours, but can be invalidated before then due to conflicting operations. For example, if a resource 16802 has been deleted and purged from the system, then a retry of the original creation request 16803 might be rejected. 16804 16805 :param obj retry_strategy: (optional) 16806 A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. 16807 16808 This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. 16809 The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. 16810 16811 To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. 16812 16813 :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_catalog.models.ValidatePatternResult` 16814 :rtype: :class:`~oci.response.Response` 16815 16816 :example: 16817 Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/datacatalog/validate_pattern.py.html>`__ to see an example of how to use validate_pattern API. 16818 """ 16819 resource_path = "/catalogs/{catalogId}/patterns/{patternKey}/actions/validate" 16820 method = "POST" 16821 16822 # Don't accept unknown kwargs 16823 expected_kwargs = [ 16824 "retry_strategy", 16825 "opc_request_id", 16826 "opc_retry_token" 16827 ] 16828 extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] 16829 if extra_kwargs: 16830 raise ValueError( 16831 "validate_pattern got unknown kwargs: {!r}".format(extra_kwargs)) 16832 16833 path_params = { 16834 "catalogId": catalog_id, 16835 "patternKey": pattern_key 16836 } 16837 16838 path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} 16839 16840 for (k, v) in six.iteritems(path_params): 16841 if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): 16842 raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) 16843 16844 header_params = { 16845 "accept": "application/json", 16846 "content-type": "application/json", 16847 "opc-request-id": kwargs.get("opc_request_id", missing), 16848 "opc-retry-token": kwargs.get("opc_retry_token", missing) 16849 } 16850 header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} 16851 16852 retry_strategy = self.base_client.get_preferred_retry_strategy( 16853 operation_retry_strategy=kwargs.get('retry_strategy'), 16854 client_retry_strategy=self.retry_strategy 16855 ) 16856 if retry_strategy is None: 16857 retry_strategy = retry.DEFAULT_RETRY_STRATEGY 16858 16859 if retry_strategy: 16860 if not isinstance(retry_strategy, retry.NoneRetryStrategy): 16861 self.base_client.add_opc_retry_token_if_needed(header_params) 16862 self.base_client.add_opc_client_retries_header(header_params) 16863 retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 16864 return retry_strategy.make_retrying_call( 16865 self.base_client.call_api, 16866 resource_path=resource_path, 16867 method=method, 16868 path_params=path_params, 16869 header_params=header_params, 16870 body=validate_pattern_details, 16871 response_type="ValidatePatternResult") 16872 else: 16873 return self.base_client.call_api( 16874 resource_path=resource_path, 16875 method=method, 16876 path_params=path_params, 16877 header_params=header_params, 16878 body=validate_pattern_details, 16879 response_type="ValidatePatternResult") 16880