budgets_actions
Creates, updates, deletes or gets a budgets_action
resource or lists budgets_actions
in a region
Overview
Name | budgets_actions |
Type | Resource |
Description | An example resource schema demonstrating some basic constructs and validation rules. |
Id | aws.budgets.budgets_actions |
Fields
Name | Datatype | Description |
---|---|---|
action_id | string | |
budget_name | string | |
notification_type | string | |
action_type | string | |
action_threshold | object | |
execution_role_arn | string | |
approval_model | string | |
subscribers | array | |
definition | object | |
resource_tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | BudgetName, NotificationType, ActionType, ActionThreshold, ExecutionRoleArn, Definition, Subscribers, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all budgets_actions
in a region.
SELECT
region,
action_id,
budget_name,
notification_type,
action_type,
action_threshold,
execution_role_arn,
approval_model,
subscribers,
definition,
resource_tags
FROM aws.budgets.budgets_actions
WHERE region = 'us-east-1';
Gets all properties from an individual budgets_action
.
SELECT
region,
action_id,
budget_name,
notification_type,
action_type,
action_threshold,
execution_role_arn,
approval_model,
subscribers,
definition,
resource_tags
FROM aws.budgets.budgets_actions
WHERE region = 'us-east-1' AND data__Identifier = '<ActionId>|<BudgetName>';
INSERT
example
Use the following StackQL query and manifest file to create a new budgets_action
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.budgets.budgets_actions (
BudgetName,
NotificationType,
ActionType,
ActionThreshold,
ExecutionRoleArn,
Subscribers,
Definition,
region
)
SELECT
'{{ BudgetName }}',
'{{ NotificationType }}',
'{{ ActionType }}',
'{{ ActionThreshold }}',
'{{ ExecutionRoleArn }}',
'{{ Subscribers }}',
'{{ Definition }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.budgets.budgets_actions (
BudgetName,
NotificationType,
ActionType,
ActionThreshold,
ExecutionRoleArn,
ApprovalModel,
Subscribers,
Definition,
ResourceTags,
region
)
SELECT
'{{ BudgetName }}',
'{{ NotificationType }}',
'{{ ActionType }}',
'{{ ActionThreshold }}',
'{{ ExecutionRoleArn }}',
'{{ ApprovalModel }}',
'{{ Subscribers }}',
'{{ Definition }}',
'{{ ResourceTags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: budgets_action
props:
- name: BudgetName
value: '{{ BudgetName }}'
- name: NotificationType
value: '{{ NotificationType }}'
- name: ActionType
value: '{{ ActionType }}'
- name: ActionThreshold
value:
Value: null
Type: '{{ Type }}'
- name: ExecutionRoleArn
value: '{{ ExecutionRoleArn }}'
- name: ApprovalModel
value: '{{ ApprovalModel }}'
- name: Subscribers
value:
- Type: '{{ Type }}'
Address: '{{ Address }}'
- name: Definition
value:
IamActionDefinition:
PolicyArn: '{{ PolicyArn }}'
Roles:
- '{{ Roles[0] }}'
Groups:
- '{{ Groups[0] }}'
Users:
- '{{ Users[0] }}'
ScpActionDefinition:
PolicyId: '{{ PolicyId }}'
TargetIds:
- '{{ TargetIds[0] }}'
SsmActionDefinition:
Subtype: '{{ Subtype }}'
Region: '{{ Region }}'
InstanceIds:
- '{{ InstanceIds[0] }}'
- name: ResourceTags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.budgets.budgets_actions
WHERE data__Identifier = '<ActionId|BudgetName>'
AND region = 'us-east-1';
Permissions
To operate on the budgets_actions
resource, the following permissions are required:
Create
budgets:CreateBudgetAction,
iam:PassRole,
budgets:TagResource
Read
budgets:DescribeBudgetAction,
budgets:ListTagsForResource
Update
budgets:UpdateBudgetAction,
iam:PassRole,
budgets:TagResource,
budgets:UntagResource,
budgets:ListTagsForResource
Delete
budgets:DeleteBudgetAction
List
budgets:DescribeBudgetActionsForAccount,
budgets:DescribeBudgetActionsForBudget