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 | awscc.budgets.budgets_actions |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
action_id | string | |
budget_name | string | |
region | string | AWS region. |
For more information, see AWS::Budgets::BudgetsAction.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | budgets_actions | INSERT | BudgetName, NotificationType, ActionType, ActionThreshold, ExecutionRoleArn, Definition, Subscribers, region |
delete_resource | budgets_actions | DELETE | Identifier, region |
update_resource | budgets_actions | UPDATE | Identifier, PatchDocument, region |
list_resources | budgets_actions_list_only | SELECT | region |
get_resource | budgets_actions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.budgets.budgets_actions
WHERE
region = 'us-east-1' AND
Identifier = '{{ action_id }}|{{ budget_name }}';
Lists all budgets_actions in a region.
SELECT
region,
action_id,
budget_name
FROM awscc.budgets.budgets_actions_list_only
WHERE
region = 'us-east-1';
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 awscc.budgets.budgets_actions (
BudgetName,
NotificationType,
ActionType,
ActionThreshold,
ExecutionRoleArn,
Subscribers,
Definition,
region
)
SELECT
'{{ budget_name }}',
'{{ notification_type }}',
'{{ action_type }}',
'{{ action_threshold }}',
'{{ execution_role_arn }}',
'{{ subscribers }}',
'{{ definition }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.budgets.budgets_actions (
BudgetName,
NotificationType,
ActionType,
ActionThreshold,
ExecutionRoleArn,
ApprovalModel,
Subscribers,
Definition,
ResourceTags,
region
)
SELECT
'{{ budget_name }}',
'{{ notification_type }}',
'{{ action_type }}',
'{{ action_threshold }}',
'{{ execution_role_arn }}',
'{{ approval_model }}',
'{{ subscribers }}',
'{{ definition }}',
'{{ resource_tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: budgets_action
props:
- name: budget_name
value: '{{ budget_name }}'
- name: notification_type
value: '{{ notification_type }}'
- name: action_type
value: '{{ action_type }}'
- name: action_threshold
value:
value: null
type: '{{ type }}'
- name: execution_role_arn
value: '{{ execution_role_arn }}'
- name: approval_model
value: '{{ approval_model }}'
- name: subscribers
value:
- type: '{{ type }}'
address: '{{ address }}'
- name: definition
value:
iam_action_definition:
policy_arn: '{{ policy_arn }}'
roles:
- '{{ roles[0] }}'
groups:
- '{{ groups[0] }}'
users:
- '{{ users[0] }}'
scp_action_definition:
policy_id: '{{ policy_id }}'
target_ids:
- '{{ target_ids[0] }}'
ssm_action_definition:
subtype: '{{ subtype }}'
region: '{{ region }}'
instance_ids:
- '{{ instance_ids[0] }}'
- name: resource_tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a budgets_action resource, using stack-deploy.
/*+ update */
UPDATE awscc.budgets.budgets_actions
SET PatchDocument = string('{{ {
"NotificationType": notification_type,
"ActionThreshold": action_threshold,
"ExecutionRoleArn": execution_role_arn,
"ApprovalModel": approval_model,
"Subscribers": subscribers,
"Definition": definition,
"ResourceTags": resource_tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ action_id }}|{{ budget_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.budgets.budgets_actions
WHERE
Identifier = '{{ action_id }}|{{ budget_name }}' AND
region = 'us-east-1';
Permissions
To operate on the budgets_actions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
budgets:CreateBudgetAction,
iam:PassRole,
budgets:TagResource
budgets:DescribeBudgetAction,
budgets:ListTagsForResource
budgets:UpdateBudgetAction,
iam:PassRole,
budgets:TagResource,
budgets:UntagResource,
budgets:ListTagsForResource
budgets:DeleteBudgetAction
budgets:DescribeBudgetActionsForAccount,
budgets:DescribeBudgetActionsForBudget