oracle / oracle/oci-python-sdk

Error using FlowLogCaptureFilterRuleDetails

Open
#652 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Networking
Dominant language
Python
Stars
474
Forks
321
Avg merge
23m
Merged PRs (30d)
4

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin at core_client.update_capture_filter and the linked FlowLogCaptureFilterRuleDetails and UpdateCaptureFilterDetails documentation. Reproduce the request with the shown SDK and Python versions, enable the referenced OCI logging guidance, and compare the operation requirements; done means identifying a documented request problem or capturing enough evidence for the service/support path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, cloud, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.