aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

budgets describe-notifications-for-budget doesn't contains "ThresholdType" field

Open takezoux2 opened this issue 3 years ago • 1 comments

Describe the bug

"ThresholdType" field is NOT contained In budgets describe-notifications-for-budget response according to Reference

Expected Behavior

ThresholdType will be "PERCENTAGE" or "ABSOLUTE_VALUE".

Current Behavior

No "ThresholdType" is returned.

Reproduction Steps

aws budgets describe-notifications-for-budget --account-id MY_ACCOUNT_ID --budget-name MY_BUDGET_NAME

will return

{
    "Notifications": [
        {
            "NotificationType": "ACTUAL",
            "ComparisonOperator": "GREATER_THAN",
            "Threshold": 100.0,
            "NotificationState": "OK"
        },
        {
            "NotificationType": "ACTUAL",
            "ComparisonOperator": "GREATER_THAN",
            "Threshold": 300.0,
            "NotificationState": "OK"
        },
        ...
}

Possible Solution

ThresholdType is contained in response

Additional Information/Context

No response

CLI version used

aws-cli/2.4.18 Python/3.9.10 Darwin/21.6.0 source/x86_64 prompt/off

Environment details (OS name and version, etc.)

Mac OS

takezoux2 avatar Jul 29 '22 09:07 takezoux2

Hi @takezoux2, thanks for reporting this. It seems to me that ThresholdType only returns when it’s set to ABSOLUTE_VALUE thresholds and does not return for PERCENTAGE thresholds. Could you please confirm that your ThresholdType is set to PERCENTAGE which is why it didn’t return?

Here’s an example after changing the type to ABSOLUTE_VALUE :

aws budgets describe-notifications-for-budget --account-id ACCOUNT_ID --budget-name aws-budget
{
    "Notifications": [
        {
            "NotificationType": "ACTUAL",
            "ComparisonOperator": "GREATER_THAN",
            "Threshold": 1.0,
            "ThresholdType": "ABSOLUTE_VALUE",
            "NotificationState": "OK"
        }
    ]
}

aBurmeseDev avatar Aug 02 '22 08:08 aBurmeseDev