Skip to content

LogAnalytics - ListScheduledTasks - Enum parameter issue #149

Open
@jbcintra

Description

@jbcintra

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Logging AnalyticsIssue pertains to the Logging Analytics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions