budget_actions
Creates, updates, deletes, gets or lists a budget_actions resource.
Overview
| Name | budget_actions |
| Type | Resource |
| Id | aws.budgets.budget_actions |
Fields
The following fields are returned by SELECT queries:
- describe_budget_action
| Name | Datatype | Description |
|---|---|---|
account_id | string | The account ID of the user. It's a 12-digit number. (pattern: <code>\d{12}</code>) |
action | object | A budget action resource. |
budget_name | string | A string that represents the budget name. The ":" and "" characters, and the "/action/" substring, aren't allowed. Budget names are validated for content. Names that contain phone numbers, URLs, or email addresses combined with certain terms may be rejected. (pattern: <code>^(?![^:\]/action/|(?i).<script>.</script>.)[^:\]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_budget_action | select | region | Describes a budget action detail. | |
create_budget_action | insert | region, AccountId, BudgetName, NotificationType, ActionType, ActionThreshold, Definition, ExecutionRoleArn, ApprovalModel, Subscribers | Creates a budget action. | |
update_budget_action | update | region, AccountId, BudgetName, ActionId | Updates a budget action. | |
delete_budget_action | delete | region | Deletes a budget action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_budget_action
Describes a budget action detail.
SELECT
account_id,
action,
budget_name
FROM aws.budgets.budget_actions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_budget_action
- Manifest
Creates a budget action.
INSERT INTO aws.budgets.budget_actions (
AccountId,
BudgetName,
NotificationType,
ActionType,
ActionThreshold,
Definition,
ExecutionRoleArn,
ApprovalModel,
Subscribers,
ResourceTags,
region
)
SELECT
'{{ AccountId }}' /* required */,
'{{ BudgetName }}' /* required */,
'{{ NotificationType }}' /* required */,
'{{ ActionType }}' /* required */,
'{{ ActionThreshold }}' /* required */,
'{{ Definition }}' /* required */,
'{{ ExecutionRoleArn }}' /* required */,
'{{ ApprovalModel }}' /* required */,
'{{ Subscribers }}' /* required */,
'{{ ResourceTags }}',
'{{ region }}'
RETURNING
account_id,
action_id,
budget_name
;
# Description fields are for documentation purposes
- name: budget_actions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the budget_actions resource.
- name: AccountId
value: "{{ AccountId }}"
description: |
The account ID of the user. It's a 12-digit number.
- name: BudgetName
value: "{{ BudgetName }}"
description: |
A string that represents the budget name. The ":" and "" characters, and the "/action/" substring, aren't allowed. Budget names are validated for content. Names that contain phone numbers, URLs, or email addresses combined with certain terms may be rejected.
- name: NotificationType
value: "{{ NotificationType }}"
description: |
The type of a notification. It must be ACTUAL or FORECASTED.
valid_values: ['ACTUAL', 'FORECASTED']
- name: ActionType
value: "{{ ActionType }}"
description: |
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.
valid_values: ['APPLY_IAM_POLICY', 'APPLY_SCP_POLICY', 'RUN_SSM_DOCUMENTS']
- name: ActionThreshold
description: |
The trigger threshold of the action.
value:
ActionThresholdValue: {{ ActionThresholdValue }}
ActionThresholdType: "{{ ActionThresholdType }}"
- name: Definition
description: |
Specifies all of the type-specific parameters.
value:
IamActionDefinition:
PolicyArn: "{{ PolicyArn }}"
Roles:
- "{{ Roles }}"
Groups:
- "{{ Groups }}"
Users:
- "{{ Users }}"
ScpActionDefinition:
PolicyId: "{{ PolicyId }}"
TargetIds:
- "{{ TargetIds }}"
SsmActionDefinition:
ActionSubType: "{{ ActionSubType }}"
Region: "{{ Region }}"
InstanceIds:
- "{{ InstanceIds }}"
- name: ExecutionRoleArn
value: "{{ ExecutionRoleArn }}"
description: |
The role passed for action execution and reversion. Roles and actions must be in the same account.
- name: ApprovalModel
value: "{{ ApprovalModel }}"
description: |
This specifies if the action needs manual or automatic approval.
valid_values: ['AUTOMATIC', 'MANUAL']
- name: Subscribers
description: |
A list of subscribers.
value:
- SubscriptionType: "{{ SubscriptionType }}"
Address: "{{ Address }}"
- name: ResourceTags
description: |
An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_budget_action
Updates a budget action.
UPDATE aws.budgets.budget_actions
SET
AccountId = '{{ AccountId }}',
BudgetName = '{{ BudgetName }}',
ActionId = '{{ ActionId }}',
NotificationType = '{{ NotificationType }}',
ActionThreshold = '{{ ActionThreshold }}',
Definition = '{{ Definition }}',
ExecutionRoleArn = '{{ ExecutionRoleArn }}',
ApprovalModel = '{{ ApprovalModel }}',
Subscribers = '{{ Subscribers }}'
WHERE
region = '{{ region }}' --required
AND AccountId = '{{ AccountId }}' --required
AND BudgetName = '{{ BudgetName }}' --required
AND ActionId = '{{ ActionId }}' --required
RETURNING
account_id,
budget_name,
new_action,
old_action;
DELETE examples
- delete_budget_action
Deletes a budget action.
DELETE FROM aws.budgets.budget_actions
WHERE region = '{{ region }}' --required
;