Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogAnalytics - ListScheduledTasks - Enum parameter issue #149

Open
jbcintra opened this issue Nov 29, 2022 · 5 comments
Open

LogAnalytics - ListScheduledTasks - Enum parameter issue #149

jbcintra opened this issue Nov 29, 2022 · 5 comments
Labels
Logging Analytics Issue pertains to the Logging Analytics

Comments

@jbcintra
Copy link

Hi,
I'm calling ListScheduledTasks which has 3 parameters. CompartmentId, NamespaceName, and TaskType.
TaskType is LA Enum TaskType, with a set of values.
I'm coding it to enumerate the values, so that it accomodates future changes.

var types = Enum.GetValues(typeof(TaskType)).Cast();
// this returns a list of TaskTypes to process in a foreach loop.
The TaskType values are:
UnknownEnumValue
SavedSearch
Acceleration
Purge
AccelerationMaintenance

Passing in UnknownEnumValue causes an ArgumentNullException error, so I've set that to skip..

When it gets to AccelerationMaintenance, it is passing in ACCELERATION_MAINTENANCE and taskType is invalid. The same error occurs via the CLI - so this is an API level error...

oci log-analytics scheduled-task list --namespace-name --compartment-id ocid1.compartment.oc1..**** --task-type ACCELERATION_MAINTENANCE --profile SSCL

yet the CLI outputs that as one of the approved values

@github-anurag
Copy link
Member

@jbcintra
Thanks for reporting this issue. We will investigate and let you know our findings.

@github-anurag github-anurag added the Logging Issue pertains to the Logging service label Nov 29, 2022
@github-anurag
Copy link
Member

@jbcintra
I have reported this to the Log Analytics team. I will get back to you once they respond back with their finding.

@jbcintra
Copy link
Author

Thanks @github-anurag

@github-anurag
Copy link
Member

@jbcintra
The ACCELERATION_MAINTENANCE taskType is an internal value and is not meant to be used via public APIs. The service team will be removing this enum from their API spec which would trigger its removal from the SDKs.

Also, the UnknownEnumValue enum only makes sense when the Service sends down a response enum whose value is not available in the version of the OCI Dotnet SDK you are using. It is not meant to be used in a request :)

@jbcintra
Copy link
Author

Thanks @github-anurag , that explains why is wasn't handling the Unknown/null input then! I'll leave that disabled till it's removed from the next release. I was only referencing it as it was a mandatory variable!

@github-anurag github-anurag added Logging Analytics Issue pertains to the Logging Analytics and removed Logging Issue pertains to the Logging service labels Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Logging Analytics Issue pertains to the Logging Analytics
Projects
None yet
Development

No branches or pull requests

2 participants