Skip to main content

budgets_actions

Creates, updates, deletes or gets a budgets_action resource or lists budgets_actions in a region

Overview

Namebudgets_actions
TypeResource
DescriptionAn example resource schema demonstrating some basic constructs and validation rules.
Idawscc.budgets.budgets_actions

Fields

NameDatatypeDescription
action_idstring
budget_namestring
notification_typestring
action_typestring
action_thresholdobject
execution_role_arnstring
approval_modelstring
subscribersarray
definitionobject
resource_tagsarray
regionstringAWS region.

For more information, see AWS::Budgets::BudgetsAction.

Methods

NameResourceAccessible byRequired Params
create_resourcebudgets_actionsINSERTBudgetName, NotificationType, ActionType, ActionThreshold, ExecutionRoleArn, Definition, Subscribers, region
delete_resourcebudgets_actionsDELETEIdentifier, region
update_resourcebudgets_actionsUPDATEIdentifier, PatchDocument, region
list_resourcesbudgets_actions_list_onlySELECTregion
get_resourcebudgets_actionsSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new budgets_action resource, using stack-deploy.

/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.budgets.budgets_actions
WHERE
Identifier = '{{ action_id }}|{{ budget_name }}' AND
region = 'us-east-1'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the budgets_actions resource, the following permissions are required:

budgets:CreateBudgetAction,
iam:PassRole,
budgets:TagResource