oracle/oci-python-sdk

Error using FlowLogCaptureFilterRuleDetails

Opened this issue · 0 comments

I'm trying to modify the sampling rate on all Capture Filters across my tenancy but it's not working. See details below.

Link to Function
https://docs.oracle.com/en-us/iaas/tools/python/2.126.4/api/core/models/oci.core.models.FlowLogCaptureFilterRuleDetails.html#oci.core.models.FlowLogCaptureFilterRuleDetails

Sample Code

core_client = oci.core.VirtualNetworkClient(config)
cf_example = "ocid1.capturefilter.oc1.eu-frankfurt-1.amaaaaaaww2hzvaajbm5445qz57sl5x6ireqfogmz2ds62zw2h2hpxtuamka"

update_capture_filter_response = core_client.update_capture_filter(
capture_filter_id=cf_example,
update_capture_filter_details=oci.core.models.UpdateCaptureFilterDetails(
                              display_name="PrivateSubnet2-cf_aa",
                              flow_log_capture_filter_rules=[oci.core.models.FlowLogCaptureFilterRuleDetails(
                                                             sampling_rate=86872)]))
print(update_capture_filter_response.data)

Error
oci.exceptions.TransientServiceError: {'target_service': 'virtual_network', 'status': 500, 'code': 'InternalError', 'opc-request-id': '8E4529356EB546E6A85DACE4BD26AB43/B59BE8CC8BCDC54DB06389CC8F6383F6/256BDF0A97F27DB1AC9A7064DDF4135F', 'message': 'Internal error occurred', 'operation_name': 'update_capture_filter', 'timestamp': '2024-05-27T14:00:49.573169+00:00', 'client_version': 'Oracle-PythonSDK/2.127.0', 'request_endpoint': 'PUT https://iaas.eu-frankfurt-1.oraclecloud.com/20160918/captureFilters/ocid1.capturefilter.oc1.eu-frankfurt-1.amaaaaaaww2hzvaajbm5445qz57sl5x6ireqfogmz2ds62zw2h2hpxtuamka', 'logging_tips': 'To get more info on the failing request, refer to https://docs.oracle.com/en-us/iaas/tools/python/latest/logging.html for ways to log the request/response details.', 'troubleshooting_tips': "See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_500__500_internalerror for more information about resolving this error. Also see https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CaptureFilter/UpdateCaptureFilter for details on this operation's requirements. If you are unable to resolve this virtual_network issue, please contact Oracle support and provide them this full error message."}

OCI Version in Python

(oci_sdk_env) PS C:\Users\wgibbs\source\oci> pip show oci
Name: oci
Version: 2.127.0
Summary: Oracle Cloud Infrastructure Python SDK
Home-page: https://docs.oracle.com/en-us/iaas/tools/python/latest/index.html
Author: Oracle
Author-email: joe.levy@oracle.com
License: Universal Permissive License 1.0 or Apache License 2.0
Location: c:\users\wgibbs\source\oci\oci_sdk_env\lib\site-packages
Requires: certifi, circuitbreaker, cryptography, pyOpenSSL, python-dateutil, pytz
Required-by:

Python Version

python.exe --version
Python 3.8.5