AWS Budgets

2020/10/15 - AWS Budgets - 8 new api methods

Changes  This release introduces AWS Budgets Actions, allowing you to define an explicit response(or set of responses) to take when your budget exceeds it's action threshold.

DescribeBudgetActionsForBudget (new) Link ¶

Describes all of the budget actions for a budget.

See also: AWS API Documentation

Request Syntax

client.describe_budget_actions_for_budget(
    AccountId='string',
    BudgetName='string',
    MaxResults=123,
    NextToken='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID of the user. It should be a 12-digit number.

type BudgetName

string

param BudgetName

[REQUIRED]

A string that represents the budget name. The ":" and "" characters aren't allowed.

type MaxResults

integer

param MaxResults

An integer that represents how many entries a paginated response contains. The maximum is 100.

type NextToken

string

param NextToken

A generic string.

rtype

dict

returns

Response Syntax

{
    'Actions': [
        {
            'ActionId': 'string',
            'BudgetName': 'string',
            'NotificationType': 'ACTUAL'|'FORECASTED',
            'ActionType': 'APPLY_IAM_POLICY'|'APPLY_SCP_POLICY'|'RUN_SSM_DOCUMENTS',
            'ActionThreshold': {
                'ActionThresholdValue': 123.0,
                'ActionThresholdType': 'PERCENTAGE'|'ABSOLUTE_VALUE'
            },
            'Definition': {
                'IamActionDefinition': {
                    'PolicyArn': 'string',
                    'Roles': [
                        'string',
                    ],
                    'Groups': [
                        'string',
                    ],
                    'Users': [
                        'string',
                    ]
                },
                'ScpActionDefinition': {
                    'PolicyId': 'string',
                    'TargetIds': [
                        'string',
                    ]
                },
                'SsmActionDefinition': {
                    'ActionSubType': 'STOP_EC2_INSTANCES'|'STOP_RDS_INSTANCES',
                    'Region': 'string',
                    'InstanceIds': [
                        'string',
                    ]
                }
            },
            'ExecutionRoleArn': 'string',
            'ApprovalModel': 'AUTOMATIC'|'MANUAL',
            'Status': 'STANDBY'|'PENDING'|'EXECUTION_IN_PROGRESS'|'EXECUTION_SUCCESS'|'EXECUTION_FAILURE'|'REVERSE_IN_PROGRESS'|'REVERSE_SUCCESS'|'REVERSE_FAILURE'|'RESET_IN_PROGRESS'|'RESET_FAILURE',
            'Subscribers': [
                {
                    'SubscriptionType': 'SNS'|'EMAIL',
                    'Address': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Actions (list) --

      A list of the budget action resources information.

      • (dict) --

        A budget action resource.

        • ActionId (string) --

          A system-generated universally unique identifier (UUID) for the action.

        • BudgetName (string) --

          A string that represents the budget name. The ":" and "" characters aren't allowed.

        • NotificationType (string) --

          The type of a notification. It must be ACTUAL or FORECASTED.

        • ActionType (string) --

          The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.

        • ActionThreshold (dict) --

          The trigger threshold of the action.

          • ActionThresholdValue (float) --

            The threshold of a notification.

          • ActionThresholdType (string) --

            The type of threshold for a notification.

        • Definition (dict) --

          Where you specify all of the type-specific parameters.

          • IamActionDefinition (dict) --

            The AWS Identity and Access Management (IAM) action definition details.

            • PolicyArn (string) --

              The Amazon Resource Name (ARN) of the policy to be attached.

            • Roles (list) --

              A list of roles to be attached. There must be at least one role.

              • (string) --

            • Groups (list) --

              A list of groups to be attached. There must be at least one group.

              • (string) --

            • Users (list) --

              A list of users to be attached. There must be at least one user.

              • (string) --

          • ScpActionDefinition (dict) --

            The service control policies (SCPs) action definition details.

            • PolicyId (string) --

              The policy ID attached.

            • TargetIds (list) --

              A list of target IDs.

              • (string) --

          • SsmActionDefinition (dict) --

            The AWS Systems Manager (SSM) action definition details.

            • ActionSubType (string) --

              The action subType.

            • Region (string) --

              The Region to run the SSM document.

            • InstanceIds (list) --

              The EC2 and RDS instance IDs.

              • (string) --

        • ExecutionRoleArn (string) --

          The role passed for action execution and reversion. Roles and actions must be in the same account.

        • ApprovalModel (string) --

          This specifies if the action needs manual or automatic approval.

        • Status (string) --

          The status of action.

        • Subscribers (list) --

          A list of subscribers.

          • (dict) --

            The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon SNS topic or an email address.

            For example, an email subscriber would have the following parameters:

            • A subscriptionType of EMAIL

            • An address of example@example.com

            • SubscriptionType (string) --

              The type of notification that AWS sends to a subscriber.

            • Address (string) --

              The address that AWS sends budget notifications to, either an SNS topic or an email.

              When you create a subscriber, the value of Address can't contain line breaks.

    • NextToken (string) --

      A generic string.

DeleteBudgetAction (new) Link ¶

Deletes a budget action.

See also: AWS API Documentation

Request Syntax

client.delete_budget_action(
    AccountId='string',
    BudgetName='string',
    ActionId='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID of the user. It should be a 12-digit number.

type BudgetName

string

param BudgetName

[REQUIRED]

A string that represents the budget name. The ":" and "" characters aren't allowed.

type ActionId

string

param ActionId

[REQUIRED]

A system-generated universally unique identifier (UUID) for the action.

rtype

dict

returns

Response Syntax

{
    'AccountId': 'string',
    'BudgetName': 'string',
    'Action': {
        'ActionId': 'string',
        'BudgetName': 'string',
        'NotificationType': 'ACTUAL'|'FORECASTED',
        'ActionType': 'APPLY_IAM_POLICY'|'APPLY_SCP_POLICY'|'RUN_SSM_DOCUMENTS',
        'ActionThreshold': {
            'ActionThresholdValue': 123.0,
            'ActionThresholdType': 'PERCENTAGE'|'ABSOLUTE_VALUE'
        },
        'Definition': {
            'IamActionDefinition': {
                'PolicyArn': 'string',
                'Roles': [
                    'string',
                ],
                'Groups': [
                    'string',
                ],
                'Users': [
                    'string',
                ]
            },
            'ScpActionDefinition': {
                'PolicyId': 'string',
                'TargetIds': [
                    'string',
                ]
            },
            'SsmActionDefinition': {
                'ActionSubType': 'STOP_EC2_INSTANCES'|'STOP_RDS_INSTANCES',
                'Region': 'string',
                'InstanceIds': [
                    'string',
                ]
            }
        },
        'ExecutionRoleArn': 'string',
        'ApprovalModel': 'AUTOMATIC'|'MANUAL',
        'Status': 'STANDBY'|'PENDING'|'EXECUTION_IN_PROGRESS'|'EXECUTION_SUCCESS'|'EXECUTION_FAILURE'|'REVERSE_IN_PROGRESS'|'REVERSE_SUCCESS'|'REVERSE_FAILURE'|'RESET_IN_PROGRESS'|'RESET_FAILURE',
        'Subscribers': [
            {
                'SubscriptionType': 'SNS'|'EMAIL',
                'Address': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • AccountId (string) --

      The account ID of the user. It should be a 12-digit number.

    • BudgetName (string) --

      A string that represents the budget name. The ":" and "" characters aren't allowed.

    • Action (dict) --

      A budget action resource.

      • ActionId (string) --

        A system-generated universally unique identifier (UUID) for the action.

      • BudgetName (string) --

        A string that represents the budget name. The ":" and "" characters aren't allowed.

      • NotificationType (string) --

        The type of a notification. It must be ACTUAL or FORECASTED.

      • ActionType (string) --

        The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.

      • ActionThreshold (dict) --

        The trigger threshold of the action.

        • ActionThresholdValue (float) --

          The threshold of a notification.

        • ActionThresholdType (string) --

          The type of threshold for a notification.

      • Definition (dict) --

        Where you specify all of the type-specific parameters.

        • IamActionDefinition (dict) --

          The AWS Identity and Access Management (IAM) action definition details.

          • PolicyArn (string) --

            The Amazon Resource Name (ARN) of the policy to be attached.

          • Roles (list) --

            A list of roles to be attached. There must be at least one role.

            • (string) --

          • Groups (list) --

            A list of groups to be attached. There must be at least one group.

            • (string) --

          • Users (list) --

            A list of users to be attached. There must be at least one user.

            • (string) --

        • ScpActionDefinition (dict) --

          The service control policies (SCPs) action definition details.

          • PolicyId (string) --

            The policy ID attached.

          • TargetIds (list) --

            A list of target IDs.

            • (string) --

        • SsmActionDefinition (dict) --

          The AWS Systems Manager (SSM) action definition details.

          • ActionSubType (string) --

            The action subType.

          • Region (string) --

            The Region to run the SSM document.

          • InstanceIds (list) --

            The EC2 and RDS instance IDs.

            • (string) --

      • ExecutionRoleArn (string) --

        The role passed for action execution and reversion. Roles and actions must be in the same account.

      • ApprovalModel (string) --

        This specifies if the action needs manual or automatic approval.

      • Status (string) --

        The status of action.

      • Subscribers (list) --

        A list of subscribers.

        • (dict) --

          The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon SNS topic or an email address.

          For example, an email subscriber would have the following parameters:

          • A subscriptionType of EMAIL

          • An address of example@example.com

          • SubscriptionType (string) --

            The type of notification that AWS sends to a subscriber.

          • Address (string) --

            The address that AWS sends budget notifications to, either an SNS topic or an email.

            When you create a subscriber, the value of Address can't contain line breaks.

UpdateBudgetAction (new) Link ¶

Updates a budget action.

See also: AWS API Documentation

Request Syntax

client.update_budget_action(
    AccountId='string',
    BudgetName='string',
    ActionId='string',
    NotificationType='ACTUAL'|'FORECASTED',
    ActionThreshold={
        'ActionThresholdValue': 123.0,
        'ActionThresholdType': 'PERCENTAGE'|'ABSOLUTE_VALUE'
    },
    Definition={
        'IamActionDefinition': {
            'PolicyArn': 'string',
            'Roles': [
                'string',
            ],
            'Groups': [
                'string',
            ],
            'Users': [
                'string',
            ]
        },
        'ScpActionDefinition': {
            'PolicyId': 'string',
            'TargetIds': [
                'string',
            ]
        },
        'SsmActionDefinition': {
            'ActionSubType': 'STOP_EC2_INSTANCES'|'STOP_RDS_INSTANCES',
            'Region': 'string',
            'InstanceIds': [
                'string',
            ]
        }
    },
    ExecutionRoleArn='string',
    ApprovalModel='AUTOMATIC'|'MANUAL',
    Subscribers=[
        {
            'SubscriptionType': 'SNS'|'EMAIL',
            'Address': 'string'
        },
    ]
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID of the user. It should be a 12-digit number.

type BudgetName

string

param BudgetName

[REQUIRED]

A string that represents the budget name. The ":" and "" characters aren't allowed.

type ActionId

string

param ActionId

[REQUIRED]

A system-generated universally unique identifier (UUID) for the action.

type NotificationType

string

param NotificationType

The type of a notification. It must be ACTUAL or FORECASTED.

type ActionThreshold

dict

param ActionThreshold

The trigger threshold of the action.

  • ActionThresholdValue (float) -- [REQUIRED]

    The threshold of a notification.

  • ActionThresholdType (string) -- [REQUIRED]

    The type of threshold for a notification.

type Definition

dict

param Definition

Specifies all of the type-specific parameters.

  • IamActionDefinition (dict) --

    The AWS Identity and Access Management (IAM) action definition details.

    • PolicyArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the policy to be attached.

    • Roles (list) --

      A list of roles to be attached. There must be at least one role.

      • (string) --

    • Groups (list) --

      A list of groups to be attached. There must be at least one group.

      • (string) --

    • Users (list) --

      A list of users to be attached. There must be at least one user.

      • (string) --

  • ScpActionDefinition (dict) --

    The service control policies (SCPs) action definition details.

    • PolicyId (string) -- [REQUIRED]

      The policy ID attached.

    • TargetIds (list) -- [REQUIRED]

      A list of target IDs.

      • (string) --

  • SsmActionDefinition (dict) --

    The AWS Systems Manager (SSM) action definition details.

    • ActionSubType (string) -- [REQUIRED]

      The action subType.

    • Region (string) -- [REQUIRED]

      The Region to run the SSM document.

    • InstanceIds (list) -- [REQUIRED]

      The EC2 and RDS instance IDs.

      • (string) --

type ExecutionRoleArn

string

param ExecutionRoleArn

The role passed for action execution and reversion. Roles and actions must be in the same account.

type ApprovalModel

string

param ApprovalModel

This specifies if the action needs manual or automatic approval.

type Subscribers

list

param Subscribers

A list of subscribers.

  • (dict) --

    The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon SNS topic or an email address.

    For example, an email subscriber would have the following parameters:

    • A subscriptionType of EMAIL

    • An address of example@example.com

    • SubscriptionType (string) -- [REQUIRED]

      The type of notification that AWS sends to a subscriber.

    • Address (string) -- [REQUIRED]

      The address that AWS sends budget notifications to, either an SNS topic or an email.

      When you create a subscriber, the value of Address can't contain line breaks.

rtype

dict

returns

Response Syntax

{
    'AccountId': 'string',
    'BudgetName': 'string',
    'OldAction': {
        'ActionId': 'string',
        'BudgetName': 'string',
        'NotificationType': 'ACTUAL'|'FORECASTED',
        'ActionType': 'APPLY_IAM_POLICY'|'APPLY_SCP_POLICY'|'RUN_SSM_DOCUMENTS',
        'ActionThreshold': {
            'ActionThresholdValue': 123.0,
            'ActionThresholdType': 'PERCENTAGE'|'ABSOLUTE_VALUE'
        },
        'Definition': {
            'IamActionDefinition': {
                'PolicyArn': 'string',
                'Roles': [
                    'string',
                ],
                'Groups': [
                    'string',
                ],
                'Users': [
                    'string',
                ]
            },
            'ScpActionDefinition': {
                'PolicyId': 'string',
                'TargetIds': [
                    'string',
                ]
            },
            'SsmActionDefinition': {
                'ActionSubType': 'STOP_EC2_INSTANCES'|'STOP_RDS_INSTANCES',
                'Region': 'string',
                'InstanceIds': [
                    'string',
                ]
            }
        },
        'ExecutionRoleArn': 'string',
        'ApprovalModel': 'AUTOMATIC'|'MANUAL',
        'Status': 'STANDBY'|'PENDING'|'EXECUTION_IN_PROGRESS'|'EXECUTION_SUCCESS'|'EXECUTION_FAILURE'|'REVERSE_IN_PROGRESS'|'REVERSE_SUCCESS'|'REVERSE_FAILURE'|'RESET_IN_PROGRESS'|'RESET_FAILURE',
        'Subscribers': [
            {
                'SubscriptionType': 'SNS'|'EMAIL',
                'Address': 'string'
            },
        ]
    },
    'NewAction': {
        'ActionId': 'string',
        'BudgetName': 'string',
        'NotificationType': 'ACTUAL'|'FORECASTED',
        'ActionType': 'APPLY_IAM_POLICY'|'APPLY_SCP_POLICY'|'RUN_SSM_DOCUMENTS',
        'ActionThreshold': {
            'ActionThresholdValue': 123.0,
            'ActionThresholdType': 'PERCENTAGE'|'ABSOLUTE_VALUE'
        },
        'Definition': {
            'IamActionDefinition': {
                'PolicyArn': 'string',
                'Roles': [
                    'string',
                ],
                'Groups': [
                    'string',
                ],
                'Users': [
                    'string',
                ]
            },
            'ScpActionDefinition': {
                'PolicyId': 'string',
                'TargetIds': [
                    'string',
                ]
            },
            'SsmActionDefinition': {
                'ActionSubType': 'STOP_EC2_INSTANCES'|'STOP_RDS_INSTANCES',
                'Region': 'string',
                'InstanceIds': [
                    'string',
                ]
            }
        },
        'ExecutionRoleArn': 'string',
        'ApprovalModel': 'AUTOMATIC'|'MANUAL',
        'Status': 'STANDBY'|'PENDING'|'EXECUTION_IN_PROGRESS'|'EXECUTION_SUCCESS'|'EXECUTION_FAILURE'|'REVERSE_IN_PROGRESS'|'REVERSE_SUCCESS'|'REVERSE_FAILURE'|'RESET_IN_PROGRESS'|'RESET_FAILURE',
        'Subscribers': [
            {
                'SubscriptionType': 'SNS'|'EMAIL',
                'Address': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • AccountId (string) --

      The account ID of the user. It should be a 12-digit number.

    • BudgetName (string) --

      A string that represents the budget name. The ":" and "" characters aren't allowed.

    • OldAction (dict) --

      The previous action resource information.

      • ActionId (string) --

        A system-generated universally unique identifier (UUID) for the action.

      • BudgetName (string) --

        A string that represents the budget name. The ":" and "" characters aren't allowed.

      • NotificationType (string) --

        The type of a notification. It must be ACTUAL or FORECASTED.

      • ActionType (string) --

        The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.

      • ActionThreshold (dict) --

        The trigger threshold of the action.

        • ActionThresholdValue (float) --

          The threshold of a notification.

        • ActionThresholdType (string) --

          The type of threshold for a notification.

      • Definition (dict) --

        Where you specify all of the type-specific parameters.

        • IamActionDefinition (dict) --

          The AWS Identity and Access Management (IAM) action definition details.

          • PolicyArn (string) --

            The Amazon Resource Name (ARN) of the policy to be attached.

          • Roles (list) --

            A list of roles to be attached. There must be at least one role.

            • (string) --

          • Groups (list) --

            A list of groups to be attached. There must be at least one group.

            • (string) --

          • Users (list) --

            A list of users to be attached. There must be at least one user.

            • (string) --

        • ScpActionDefinition (dict) --

          The service control policies (SCPs) action definition details.

          • PolicyId (string) --

            The policy ID attached.

          • TargetIds (list) --

            A list of target IDs.

            • (string) --

        • SsmActionDefinition (dict) --

          The AWS Systems Manager (SSM) action definition details.

          • ActionSubType (string) --

            The action subType.

          • Region (string) --

            The Region to run the SSM document.

          • InstanceIds (list) --

            The EC2 and RDS instance IDs.

            • (string) --

      • ExecutionRoleArn (string) --

        The role passed for action execution and reversion. Roles and actions must be in the same account.

      • ApprovalModel (string) --

        This specifies if the action needs manual or automatic approval.

      • Status (string) --

        The status of action.

      • Subscribers (list) --

        A list of subscribers.

        • (dict) --

          The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon SNS topic or an email address.

          For example, an email subscriber would have the following parameters:

          • A subscriptionType of EMAIL

          • An address of example@example.com

          • SubscriptionType (string) --

            The type of notification that AWS sends to a subscriber.

          • Address (string) --

            The address that AWS sends budget notifications to, either an SNS topic or an email.

            When you create a subscriber, the value of Address can't contain line breaks.

    • NewAction (dict) --

      The updated action resource information.

      • ActionId (string) --

        A system-generated universally unique identifier (UUID) for the action.

      • BudgetName (string) --

        A string that represents the budget name. The ":" and "" characters aren't allowed.

      • NotificationType (string) --

        The type of a notification. It must be ACTUAL or FORECASTED.

      • ActionType (string) --

        The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.

      • ActionThreshold (dict) --

        The trigger threshold of the action.

        • ActionThresholdValue (float) --

          The threshold of a notification.

        • ActionThresholdType (string) --

          The type of threshold for a notification.

      • Definition (dict) --

        Where you specify all of the type-specific parameters.

        • IamActionDefinition (dict) --

          The AWS Identity and Access Management (IAM) action definition details.

          • PolicyArn (string) --

            The Amazon Resource Name (ARN) of the policy to be attached.

          • Roles (list) --

            A list of roles to be attached. There must be at least one role.

            • (string) --

          • Groups (list) --

            A list of groups to be attached. There must be at least one group.

            • (string) --

          • Users (list) --

            A list of users to be attached. There must be at least one user.

            • (string) --

        • ScpActionDefinition (dict) --

          The service control policies (SCPs) action definition details.

          • PolicyId (string) --

            The policy ID attached.

          • TargetIds (list) --

            A list of target IDs.

            • (string) --

        • SsmActionDefinition (dict) --

          The AWS Systems Manager (SSM) action definition details.

          • ActionSubType (string) --

            The action subType.

          • Region (string) --

            The Region to run the SSM document.

          • InstanceIds (list) --

            The EC2 and RDS instance IDs.

            • (string) --

      • ExecutionRoleArn (string) --

        The role passed for action execution and reversion. Roles and actions must be in the same account.

      • ApprovalModel (string) --

        This specifies if the action needs manual or automatic approval.

      • Status (string) --

        The status of action.

      • Subscribers (list) --

        A list of subscribers.

        • (dict) --

          The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon SNS topic or an email address.

          For example, an email subscriber would have the following parameters:

          • A subscriptionType of EMAIL

          • An address of example@example.com

          • SubscriptionType (string) --

            The type of notification that AWS sends to a subscriber.

          • Address (string) --

            The address that AWS sends budget notifications to, either an SNS topic or an email.

            When you create a subscriber, the value of Address can't contain line breaks.

DescribeBudgetActionHistories (new) Link ¶

Describes a budget action history detail.

See also: AWS API Documentation

Request Syntax

client.describe_budget_action_histories(
    AccountId='string',
    BudgetName='string',
    ActionId='string',
    TimePeriod={
        'Start': datetime(2015, 1, 1),
        'End': datetime(2015, 1, 1)
    },
    MaxResults=123,
    NextToken='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID of the user. It should be a 12-digit number.

type BudgetName

string

param BudgetName

[REQUIRED]

A string that represents the budget name. The ":" and "" characters aren't allowed.

type ActionId

string

param ActionId

[REQUIRED]

A system-generated universally unique identifier (UUID) for the action.

type TimePeriod

dict

param TimePeriod

The period of time that is covered by a budget. The period has a start date and an end date. The start date must come before the end date. There are no restrictions on the end date.

  • Start (datetime) --

    The start date for a budget. If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY , and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC . If you chose MONTHLY , AWS set your start date to 01/01/18 00:00 UTC . The defaults are the same for the AWS Billing and Cost Management console and the API.

    You can change your start date with the UpdateBudget operation.

  • End (datetime) --

    The end date for a budget. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC . The defaults are the same for the AWS Billing and Cost Management console and the API.

    After the end date, AWS deletes the budget and all associated notifications and subscribers. You can change your end date with the UpdateBudget operation.

type MaxResults

integer

param MaxResults

An integer that represents how many entries a paginated response contains. The maximum is 100.

type NextToken

string

param NextToken

A generic string.

rtype

dict

returns

Response Syntax

{
    'ActionHistories': [
        {
            'Timestamp': datetime(2015, 1, 1),
            'Status': 'STANDBY'|'PENDING'|'EXECUTION_IN_PROGRESS'|'EXECUTION_SUCCESS'|'EXECUTION_FAILURE'|'REVERSE_IN_PROGRESS'|'REVERSE_SUCCESS'|'REVERSE_FAILURE'|'RESET_IN_PROGRESS'|'RESET_FAILURE',
            'EventType': 'SYSTEM'|'CREATE_ACTION'|'DELETE_ACTION'|'UPDATE_ACTION'|'EXECUTE_ACTION',
            'ActionHistoryDetails': {
                'Message': 'string',
                'Action': {
                    'ActionId': 'string',
                    'BudgetName': 'string',
                    'NotificationType': 'ACTUAL'|'FORECASTED',
                    'ActionType': 'APPLY_IAM_POLICY'|'APPLY_SCP_POLICY'|'RUN_SSM_DOCUMENTS',
                    'ActionThreshold': {
                        'ActionThresholdValue': 123.0,
                        'ActionThresholdType': 'PERCENTAGE'|'ABSOLUTE_VALUE'
                    },
                    'Definition': {
                        'IamActionDefinition': {
                            'PolicyArn': 'string',
                            'Roles': [
                                'string',
                            ],
                            'Groups': [
                                'string',
                            ],
                            'Users': [
                                'string',
                            ]
                        },
                        'ScpActionDefinition': {
                            'PolicyId': 'string',
                            'TargetIds': [
                                'string',
                            ]
                        },
                        'SsmActionDefinition': {
                            'ActionSubType': 'STOP_EC2_INSTANCES'|'STOP_RDS_INSTANCES',
                            'Region': 'string',
                            'InstanceIds': [
                                'string',
                            ]
                        }
                    },
                    'ExecutionRoleArn': 'string',
                    'ApprovalModel': 'AUTOMATIC'|'MANUAL',
                    'Status': 'STANDBY'|'PENDING'|'EXECUTION_IN_PROGRESS'|'EXECUTION_SUCCESS'|'EXECUTION_FAILURE'|'REVERSE_IN_PROGRESS'|'REVERSE_SUCCESS'|'REVERSE_FAILURE'|'RESET_IN_PROGRESS'|'RESET_FAILURE',
                    'Subscribers': [
                        {
                            'SubscriptionType': 'SNS'|'EMAIL',
                            'Address': 'string'
                        },
                    ]
                }
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ActionHistories (list) --

      The historical record of the budget action resource.

      • (dict) --

        The historical records for a budget action.

        • Timestamp (datetime) --

          A generic time stamp. In Java, it is transformed to a Date object.

        • Status (string) --

          The status of action at the time of the event.

        • EventType (string) --

          This distinguishes between whether the events are triggered by the user or generated by the system.

        • ActionHistoryDetails (dict) --

          The description of details of the event.

          • Message (string) --

            A generic string.

          • Action (dict) --

            The budget action resource.

            • ActionId (string) --

              A system-generated universally unique identifier (UUID) for the action.

            • BudgetName (string) --

              A string that represents the budget name. The ":" and "" characters aren't allowed.

            • NotificationType (string) --

              The type of a notification. It must be ACTUAL or FORECASTED.

            • ActionType (string) --

              The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.

            • ActionThreshold (dict) --

              The trigger threshold of the action.

              • ActionThresholdValue (float) --

                The threshold of a notification.

              • ActionThresholdType (string) --

                The type of threshold for a notification.

            • Definition (dict) --

              Where you specify all of the type-specific parameters.

              • IamActionDefinition (dict) --

                The AWS Identity and Access Management (IAM) action definition details.

                • PolicyArn (string) --

                  The Amazon Resource Name (ARN) of the policy to be attached.

                • Roles (list) --

                  A list of roles to be attached. There must be at least one role.

                  • (string) --

                • Groups (list) --

                  A list of groups to be attached. There must be at least one group.

                  • (string) --

                • Users (list) --

                  A list of users to be attached. There must be at least one user.

                  • (string) --

              • ScpActionDefinition (dict) --

                The service control policies (SCPs) action definition details.

                • PolicyId (string) --

                  The policy ID attached.

                • TargetIds (list) --

                  A list of target IDs.

                  • (string) --

              • SsmActionDefinition (dict) --

                The AWS Systems Manager (SSM) action definition details.

                • ActionSubType (string) --

                  The action subType.

                • Region (string) --

                  The Region to run the SSM document.

                • InstanceIds (list) --

                  The EC2 and RDS instance IDs.

                  • (string) --

            • ExecutionRoleArn (string) --

              The role passed for action execution and reversion. Roles and actions must be in the same account.

            • ApprovalModel (string) --

              This specifies if the action needs manual or automatic approval.

            • Status (string) --

              The status of action.

            • Subscribers (list) --

              A list of subscribers.

              • (dict) --

                The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon SNS topic or an email address.

                For example, an email subscriber would have the following parameters:

                • A subscriptionType of EMAIL

                • An address of example@example.com

                • SubscriptionType (string) --

                  The type of notification that AWS sends to a subscriber.

                • Address (string) --

                  The address that AWS sends budget notifications to, either an SNS topic or an email.

                  When you create a subscriber, the value of Address can't contain line breaks.

    • NextToken (string) --

      A generic string.

CreateBudgetAction (new) Link ¶

Creates a budget action.

See also: AWS API Documentation

Request Syntax

client.create_budget_action(
    AccountId='string',
    BudgetName='string',
    NotificationType='ACTUAL'|'FORECASTED',
    ActionType='APPLY_IAM_POLICY'|'APPLY_SCP_POLICY'|'RUN_SSM_DOCUMENTS',
    ActionThreshold={
        'ActionThresholdValue': 123.0,
        'ActionThresholdType': 'PERCENTAGE'|'ABSOLUTE_VALUE'
    },
    Definition={
        'IamActionDefinition': {
            'PolicyArn': 'string',
            'Roles': [
                'string',
            ],
            'Groups': [
                'string',
            ],
            'Users': [
                'string',
            ]
        },
        'ScpActionDefinition': {
            'PolicyId': 'string',
            'TargetIds': [
                'string',
            ]
        },
        'SsmActionDefinition': {
            'ActionSubType': 'STOP_EC2_INSTANCES'|'STOP_RDS_INSTANCES',
            'Region': 'string',
            'InstanceIds': [
                'string',
            ]
        }
    },
    ExecutionRoleArn='string',
    ApprovalModel='AUTOMATIC'|'MANUAL',
    Subscribers=[
        {
            'SubscriptionType': 'SNS'|'EMAIL',
            'Address': 'string'
        },
    ]
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID of the user. It should be a 12-digit number.

type BudgetName

string

param BudgetName

[REQUIRED]

A string that represents the budget name. The ":" and "" characters aren't allowed.

type NotificationType

string

param NotificationType

[REQUIRED]

The type of a notification. It must be ACTUAL or FORECASTED.

type ActionType

string

param ActionType

[REQUIRED]

The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.

type ActionThreshold

dict

param ActionThreshold

[REQUIRED]

The trigger threshold of the action.

  • ActionThresholdValue (float) -- [REQUIRED]

    The threshold of a notification.

  • ActionThresholdType (string) -- [REQUIRED]

    The type of threshold for a notification.

type Definition

dict

param Definition

[REQUIRED]

Specifies all of the type-specific parameters.

  • IamActionDefinition (dict) --

    The AWS Identity and Access Management (IAM) action definition details.

    • PolicyArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the policy to be attached.

    • Roles (list) --

      A list of roles to be attached. There must be at least one role.

      • (string) --

    • Groups (list) --

      A list of groups to be attached. There must be at least one group.

      • (string) --

    • Users (list) --

      A list of users to be attached. There must be at least one user.

      • (string) --

  • ScpActionDefinition (dict) --

    The service control policies (SCPs) action definition details.

    • PolicyId (string) -- [REQUIRED]

      The policy ID attached.

    • TargetIds (list) -- [REQUIRED]

      A list of target IDs.

      • (string) --

  • SsmActionDefinition (dict) --

    The AWS Systems Manager (SSM) action definition details.

    • ActionSubType (string) -- [REQUIRED]

      The action subType.

    • Region (string) -- [REQUIRED]

      The Region to run the SSM document.

    • InstanceIds (list) -- [REQUIRED]

      The EC2 and RDS instance IDs.

      • (string) --

type ExecutionRoleArn

string

param ExecutionRoleArn

[REQUIRED]

The role passed for action execution and reversion. Roles and actions must be in the same account.

type ApprovalModel

string

param ApprovalModel

[REQUIRED]

This specifies if the action needs manual or automatic approval.

type Subscribers

list

param Subscribers

[REQUIRED]

A list of subscribers.

  • (dict) --

    The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon SNS topic or an email address.

    For example, an email subscriber would have the following parameters:

    • A subscriptionType of EMAIL

    • An address of example@example.com

    • SubscriptionType (string) -- [REQUIRED]

      The type of notification that AWS sends to a subscriber.

    • Address (string) -- [REQUIRED]

      The address that AWS sends budget notifications to, either an SNS topic or an email.

      When you create a subscriber, the value of Address can't contain line breaks.

rtype

dict

returns

Response Syntax

{
    'AccountId': 'string',
    'BudgetName': 'string',
    'ActionId': 'string'
}

Response Structure

  • (dict) --

    • AccountId (string) --

      The account ID of the user. It should be a 12-digit number.

    • BudgetName (string) --

      A string that represents the budget name. The ":" and "" characters aren't allowed.

    • ActionId (string) --

      A system-generated universally unique identifier (UUID) for the action.

ExecuteBudgetAction (new) Link ¶

Executes a budget action.

See also: AWS API Documentation

Request Syntax

client.execute_budget_action(
    AccountId='string',
    BudgetName='string',
    ActionId='string',
    ExecutionType='APPROVE_BUDGET_ACTION'|'RETRY_BUDGET_ACTION'|'REVERSE_BUDGET_ACTION'|'RESET_BUDGET_ACTION'
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID of the user. It should be a 12-digit number.

type BudgetName

string

param BudgetName

[REQUIRED]

A string that represents the budget name. The ":" and "" characters aren't allowed.

type ActionId

string

param ActionId

[REQUIRED]

A system-generated universally unique identifier (UUID) for the action.

type ExecutionType

string

param ExecutionType

[REQUIRED]

The type of execution.

rtype

dict

returns

Response Syntax

{
    'AccountId': 'string',
    'BudgetName': 'string',
    'ActionId': 'string',
    'ExecutionType': 'APPROVE_BUDGET_ACTION'|'RETRY_BUDGET_ACTION'|'REVERSE_BUDGET_ACTION'|'RESET_BUDGET_ACTION'
}

Response Structure

  • (dict) --

    • AccountId (string) --

      The account ID of the user. It should be a 12-digit number.

    • BudgetName (string) --

      A string that represents the budget name. The ":" and "" characters aren't allowed.

    • ActionId (string) --

      A system-generated universally unique identifier (UUID) for the action.

    • ExecutionType (string) --

      The type of execution.

DescribeBudgetActionsForAccount (new) Link ¶

Describes all of the budget actions for an account.

See also: AWS API Documentation

Request Syntax

client.describe_budget_actions_for_account(
    AccountId='string',
    MaxResults=123,
    NextToken='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID of the user. It should be a 12-digit number.

type MaxResults

integer

param MaxResults

An integer that represents how many entries a paginated response contains. The maximum is 100.

type NextToken

string

param NextToken

A generic string.

rtype

dict

returns

Response Syntax

{
    'Actions': [
        {
            'ActionId': 'string',
            'BudgetName': 'string',
            'NotificationType': 'ACTUAL'|'FORECASTED',
            'ActionType': 'APPLY_IAM_POLICY'|'APPLY_SCP_POLICY'|'RUN_SSM_DOCUMENTS',
            'ActionThreshold': {
                'ActionThresholdValue': 123.0,
                'ActionThresholdType': 'PERCENTAGE'|'ABSOLUTE_VALUE'
            },
            'Definition': {
                'IamActionDefinition': {
                    'PolicyArn': 'string',
                    'Roles': [
                        'string',
                    ],
                    'Groups': [
                        'string',
                    ],
                    'Users': [
                        'string',
                    ]
                },
                'ScpActionDefinition': {
                    'PolicyId': 'string',
                    'TargetIds': [
                        'string',
                    ]
                },
                'SsmActionDefinition': {
                    'ActionSubType': 'STOP_EC2_INSTANCES'|'STOP_RDS_INSTANCES',
                    'Region': 'string',
                    'InstanceIds': [
                        'string',
                    ]
                }
            },
            'ExecutionRoleArn': 'string',
            'ApprovalModel': 'AUTOMATIC'|'MANUAL',
            'Status': 'STANDBY'|'PENDING'|'EXECUTION_IN_PROGRESS'|'EXECUTION_SUCCESS'|'EXECUTION_FAILURE'|'REVERSE_IN_PROGRESS'|'REVERSE_SUCCESS'|'REVERSE_FAILURE'|'RESET_IN_PROGRESS'|'RESET_FAILURE',
            'Subscribers': [
                {
                    'SubscriptionType': 'SNS'|'EMAIL',
                    'Address': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Actions (list) --

      A list of the budget action resources information.

      • (dict) --

        A budget action resource.

        • ActionId (string) --

          A system-generated universally unique identifier (UUID) for the action.

        • BudgetName (string) --

          A string that represents the budget name. The ":" and "" characters aren't allowed.

        • NotificationType (string) --

          The type of a notification. It must be ACTUAL or FORECASTED.

        • ActionType (string) --

          The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.

        • ActionThreshold (dict) --

          The trigger threshold of the action.

          • ActionThresholdValue (float) --

            The threshold of a notification.

          • ActionThresholdType (string) --

            The type of threshold for a notification.

        • Definition (dict) --

          Where you specify all of the type-specific parameters.

          • IamActionDefinition (dict) --

            The AWS Identity and Access Management (IAM) action definition details.

            • PolicyArn (string) --

              The Amazon Resource Name (ARN) of the policy to be attached.

            • Roles (list) --

              A list of roles to be attached. There must be at least one role.

              • (string) --

            • Groups (list) --

              A list of groups to be attached. There must be at least one group.

              • (string) --

            • Users (list) --

              A list of users to be attached. There must be at least one user.

              • (string) --

          • ScpActionDefinition (dict) --

            The service control policies (SCPs) action definition details.

            • PolicyId (string) --

              The policy ID attached.

            • TargetIds (list) --

              A list of target IDs.

              • (string) --

          • SsmActionDefinition (dict) --

            The AWS Systems Manager (SSM) action definition details.

            • ActionSubType (string) --

              The action subType.

            • Region (string) --

              The Region to run the SSM document.

            • InstanceIds (list) --

              The EC2 and RDS instance IDs.

              • (string) --

        • ExecutionRoleArn (string) --

          The role passed for action execution and reversion. Roles and actions must be in the same account.

        • ApprovalModel (string) --

          This specifies if the action needs manual or automatic approval.

        • Status (string) --

          The status of action.

        • Subscribers (list) --

          A list of subscribers.

          • (dict) --

            The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon SNS topic or an email address.

            For example, an email subscriber would have the following parameters:

            • A subscriptionType of EMAIL

            • An address of example@example.com

            • SubscriptionType (string) --

              The type of notification that AWS sends to a subscriber.

            • Address (string) --

              The address that AWS sends budget notifications to, either an SNS topic or an email.

              When you create a subscriber, the value of Address can't contain line breaks.

    • NextToken (string) --

      A generic string.

DescribeBudgetAction (new) Link ¶

Describes a budget action detail.

See also: AWS API Documentation

Request Syntax

client.describe_budget_action(
    AccountId='string',
    BudgetName='string',
    ActionId='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID of the user. It should be a 12-digit number.

type BudgetName

string

param BudgetName

[REQUIRED]

A string that represents the budget name. The ":" and "" characters aren't allowed.

type ActionId

string

param ActionId

[REQUIRED]

A system-generated universally unique identifier (UUID) for the action.

rtype

dict

returns

Response Syntax

{
    'AccountId': 'string',
    'BudgetName': 'string',
    'Action': {
        'ActionId': 'string',
        'BudgetName': 'string',
        'NotificationType': 'ACTUAL'|'FORECASTED',
        'ActionType': 'APPLY_IAM_POLICY'|'APPLY_SCP_POLICY'|'RUN_SSM_DOCUMENTS',
        'ActionThreshold': {
            'ActionThresholdValue': 123.0,
            'ActionThresholdType': 'PERCENTAGE'|'ABSOLUTE_VALUE'
        },
        'Definition': {
            'IamActionDefinition': {
                'PolicyArn': 'string',
                'Roles': [
                    'string',
                ],
                'Groups': [
                    'string',
                ],
                'Users': [
                    'string',
                ]
            },
            'ScpActionDefinition': {
                'PolicyId': 'string',
                'TargetIds': [
                    'string',
                ]
            },
            'SsmActionDefinition': {
                'ActionSubType': 'STOP_EC2_INSTANCES'|'STOP_RDS_INSTANCES',
                'Region': 'string',
                'InstanceIds': [
                    'string',
                ]
            }
        },
        'ExecutionRoleArn': 'string',
        'ApprovalModel': 'AUTOMATIC'|'MANUAL',
        'Status': 'STANDBY'|'PENDING'|'EXECUTION_IN_PROGRESS'|'EXECUTION_SUCCESS'|'EXECUTION_FAILURE'|'REVERSE_IN_PROGRESS'|'REVERSE_SUCCESS'|'REVERSE_FAILURE'|'RESET_IN_PROGRESS'|'RESET_FAILURE',
        'Subscribers': [
            {
                'SubscriptionType': 'SNS'|'EMAIL',
                'Address': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • AccountId (string) --

      The account ID of the user. It should be a 12-digit number.

    • BudgetName (string) --

      A string that represents the budget name. The ":" and "" characters aren't allowed.

    • Action (dict) --

      A budget action resource.

      • ActionId (string) --

        A system-generated universally unique identifier (UUID) for the action.

      • BudgetName (string) --

        A string that represents the budget name. The ":" and "" characters aren't allowed.

      • NotificationType (string) --

        The type of a notification. It must be ACTUAL or FORECASTED.

      • ActionType (string) --

        The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.

      • ActionThreshold (dict) --

        The trigger threshold of the action.

        • ActionThresholdValue (float) --

          The threshold of a notification.

        • ActionThresholdType (string) --

          The type of threshold for a notification.

      • Definition (dict) --

        Where you specify all of the type-specific parameters.

        • IamActionDefinition (dict) --

          The AWS Identity and Access Management (IAM) action definition details.

          • PolicyArn (string) --

            The Amazon Resource Name (ARN) of the policy to be attached.

          • Roles (list) --

            A list of roles to be attached. There must be at least one role.

            • (string) --

          • Groups (list) --

            A list of groups to be attached. There must be at least one group.

            • (string) --

          • Users (list) --

            A list of users to be attached. There must be at least one user.

            • (string) --

        • ScpActionDefinition (dict) --

          The service control policies (SCPs) action definition details.

          • PolicyId (string) --

            The policy ID attached.

          • TargetIds (list) --

            A list of target IDs.

            • (string) --

        • SsmActionDefinition (dict) --

          The AWS Systems Manager (SSM) action definition details.

          • ActionSubType (string) --

            The action subType.

          • Region (string) --

            The Region to run the SSM document.

          • InstanceIds (list) --

            The EC2 and RDS instance IDs.

            • (string) --

      • ExecutionRoleArn (string) --

        The role passed for action execution and reversion. Roles and actions must be in the same account.

      • ApprovalModel (string) --

        This specifies if the action needs manual or automatic approval.

      • Status (string) --

        The status of action.

      • Subscribers (list) --

        A list of subscribers.

        • (dict) --

          The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon SNS topic or an email address.

          For example, an email subscriber would have the following parameters:

          • A subscriptionType of EMAIL

          • An address of example@example.com

          • SubscriptionType (string) --

            The type of notification that AWS sends to a subscriber.

          • Address (string) --

            The address that AWS sends budget notifications to, either an SNS topic or an email.

            When you create a subscriber, the value of Address can't contain line breaks.