Class CfnBudgetsAction

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:55.849Z") @Stability(Stable) public class CfnBudgetsAction extends CfnResource implements IInspectable
A CloudFormation AWS::Budgets::BudgetsAction.

The AWS::Budgets::BudgetsAction resource enables you to take predefined actions that are initiated when a budget threshold has been exceeded. For more information, see Managing Your Costs with Budgets in the AWS Billing and Cost Management User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.budgets.*;
 CfnBudgetsAction cfnBudgetsAction = CfnBudgetsAction.Builder.create(this, "MyCfnBudgetsAction")
         .actionThreshold(ActionThresholdProperty.builder()
                 .type("type")
                 .value(123)
                 .build())
         .actionType("actionType")
         .budgetName("budgetName")
         .definition(DefinitionProperty.builder()
                 .iamActionDefinition(IamActionDefinitionProperty.builder()
                         .policyArn("policyArn")
                         // the properties below are optional
                         .groups(List.of("groups"))
                         .roles(List.of("roles"))
                         .users(List.of("users"))
                         .build())
                 .scpActionDefinition(ScpActionDefinitionProperty.builder()
                         .policyId("policyId")
                         .targetIds(List.of("targetIds"))
                         .build())
                 .ssmActionDefinition(SsmActionDefinitionProperty.builder()
                         .instanceIds(List.of("instanceIds"))
                         .region("region")
                         .subtype("subtype")
                         .build())
                 .build())
         .executionRoleArn("executionRoleArn")
         .notificationType("notificationType")
         .subscribers(List.of(SubscriberProperty.builder()
                 .address("address")
                 .type("type")
                 .build()))
         // the properties below are optional
         .approvalModel("approvalModel")
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnBudgetsAction

      protected CfnBudgetsAction(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnBudgetsAction

      protected CfnBudgetsAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnBudgetsAction

      @Stability(Stable) public CfnBudgetsAction(@NotNull Construct scope, @NotNull String id, @NotNull CfnBudgetsActionProps props)
      Create a new AWS::Budgets::BudgetsAction.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrActionId

      @Stability(Stable) @NotNull public String getAttrActionId()
      A system-generated universally unique identifier (UUID) for the action.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getActionThreshold

      @Stability(Stable) @NotNull public Object getActionThreshold()
      The trigger threshold of the action.
    • setActionThreshold

      @Stability(Stable) public void setActionThreshold(@NotNull IResolvable value)
      The trigger threshold of the action.
    • setActionThreshold

      @Stability(Stable) public void setActionThreshold(@NotNull CfnBudgetsAction.ActionThresholdProperty value)
      The trigger threshold of the action.
    • getActionType

      @Stability(Stable) @NotNull public String getActionType()
      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.

    • setActionType

      @Stability(Stable) public void setActionType(@NotNull String value)
      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.

    • getBudgetName

      @Stability(Stable) @NotNull public String getBudgetName()
      A string that represents the budget name.

      ":" and "" characters aren't allowed.

    • setBudgetName

      @Stability(Stable) public void setBudgetName(@NotNull String value)
      A string that represents the budget name.

      ":" and "" characters aren't allowed.

    • getDefinition

      @Stability(Stable) @NotNull public Object getDefinition()
      Specifies all of the type-specific parameters.
    • setDefinition

      @Stability(Stable) public void setDefinition(@NotNull IResolvable value)
      Specifies all of the type-specific parameters.
    • setDefinition

      @Stability(Stable) public void setDefinition(@NotNull CfnBudgetsAction.DefinitionProperty value)
      Specifies all of the type-specific parameters.
    • getExecutionRoleArn

      @Stability(Stable) @NotNull public String getExecutionRoleArn()
      The role passed for action execution and reversion.

      Roles and actions must be in the same account.

    • setExecutionRoleArn

      @Stability(Stable) public void setExecutionRoleArn(@NotNull String value)
      The role passed for action execution and reversion.

      Roles and actions must be in the same account.

    • getNotificationType

      @Stability(Stable) @NotNull public String getNotificationType()
      The type of a notification.
    • setNotificationType

      @Stability(Stable) public void setNotificationType(@NotNull String value)
      The type of a notification.
    • getSubscribers

      @Stability(Stable) @NotNull public Object getSubscribers()
      A list of subscribers.
    • setSubscribers

      @Stability(Stable) public void setSubscribers(@NotNull IResolvable value)
      A list of subscribers.
    • setSubscribers

      @Stability(Stable) public void setSubscribers(@NotNull List<Object> value)
      A list of subscribers.
    • getApprovalModel

      @Stability(Stable) @Nullable public String getApprovalModel()
      This specifies if the action needs manual or automatic approval.
    • setApprovalModel

      @Stability(Stable) public void setApprovalModel(@Nullable String value)
      This specifies if the action needs manual or automatic approval.