BudgetAction

Provides a budget action resource. Budget actions are cost savings controls that run either automatically on your behalf or by using a workflow approval process.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var examplePolicy = new Aws.Iam.Policy("examplePolicy", new()
    {
        Description = "My example policy",
        PolicyDocument = @"{
  ""Version"": ""2012-10-17"",
  ""Statement"": [
    {
      ""Action"": [
        ""ec2:Describe*""
      ],
      ""Effect"": ""Allow"",
      ""Resource"": ""*""
    }
  ]
}
",
    });

    var current = Aws.GetPartition.Invoke();

    var exampleRole = new Aws.Iam.Role("exampleRole", new()
    {
        AssumeRolePolicy = @$"{{
  ""Version"": ""2012-10-17"",
  ""Statement"": [
    {{
      ""Effect"": ""Allow"",
      ""Principal"": {{
        ""Service"": [
          ""budgets.{current.Apply(getPartitionResult => getPartitionResult.DnsSuffix)}""
        ]
      }},
      ""Action"": [
        ""sts:AssumeRole""
      ]
    }}
  ]
}}
",
    });

    var exampleBudget = new Aws.Budgets.Budget("exampleBudget", new()
    {
        BudgetType = "USAGE",
        LimitAmount = "10.0",
        LimitUnit = "dollars",
        TimePeriodStart = "2006-01-02_15:04",
        TimeUnit = "MONTHLY",
    });

    var exampleBudgetAction = new Aws.Budgets.BudgetAction("exampleBudgetAction", new()
    {
        BudgetName = exampleBudget.Name,
        ActionType = "APPLY_IAM_POLICY",
        ApprovalModel = "AUTOMATIC",
        NotificationType = "ACTUAL",
        ExecutionRoleArn = exampleRole.Arn,
        ActionThreshold = new Aws.Budgets.Inputs.BudgetActionActionThresholdArgs
        {
            ActionThresholdType = "ABSOLUTE_VALUE",
            ActionThresholdValue = 100,
        },
        Definition = new Aws.Budgets.Inputs.BudgetActionDefinitionArgs
        {
            IamActionDefinition = new Aws.Budgets.Inputs.BudgetActionDefinitionIamActionDefinitionArgs
            {
                PolicyArn = examplePolicy.Arn,
                Roles = new[]
                {
                    exampleRole.Name,
                },
            },
        },
        Subscribers = new[]
        {
            new Aws.Budgets.Inputs.BudgetActionSubscriberArgs
            {
                Address = "example@example.example",
                SubscriptionType = "EMAIL",
            },
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/budgets"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		examplePolicy, err := iam.NewPolicy(ctx, "examplePolicy", &iam.PolicyArgs{
			Description: pulumi.String("My example policy"),
			Policy: pulumi.Any(fmt.Sprintf(`{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "ec2:Describe*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
`)),
		})
		if err != nil {
			return err
		}
		current, err := aws.GetPartition(ctx, nil, nil)
		if err != nil {
			return err
		}
		exampleRole, err := iam.NewRole(ctx, "exampleRole", &iam.RoleArgs{
			AssumeRolePolicy: pulumi.Any(fmt.Sprintf(`{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": [
          "budgets.%v"
        ]
      },
      "Action": [
        "sts:AssumeRole"
      ]
    }
  ]
}
`, current.DnsSuffix)),
		})
		if err != nil {
			return err
		}
		exampleBudget, err := budgets.NewBudget(ctx, "exampleBudget", &budgets.BudgetArgs{
			BudgetType:      pulumi.String("USAGE"),
			LimitAmount:     pulumi.String("10.0"),
			LimitUnit:       pulumi.String("dollars"),
			TimePeriodStart: pulumi.String("2006-01-02_15:04"),
			TimeUnit:        pulumi.String("MONTHLY"),
		})
		if err != nil {
			return err
		}
		_, err = budgets.NewBudgetAction(ctx, "exampleBudgetAction", &budgets.BudgetActionArgs{
			BudgetName:       exampleBudget.Name,
			ActionType:       pulumi.String("APPLY_IAM_POLICY"),
			ApprovalModel:    pulumi.String("AUTOMATIC"),
			NotificationType: pulumi.String("ACTUAL"),
			ExecutionRoleArn: exampleRole.Arn,
			ActionThreshold: &budgets.BudgetActionActionThresholdArgs{
				ActionThresholdType:  pulumi.String("ABSOLUTE_VALUE"),
				ActionThresholdValue: pulumi.Float64(100),
			},
			Definition: &budgets.BudgetActionDefinitionArgs{
				IamActionDefinition: &budgets.BudgetActionDefinitionIamActionDefinitionArgs{
					PolicyArn: examplePolicy.Arn,
					Roles: pulumi.StringArray{
						exampleRole.Name,
					},
				},
			},
			Subscribers: budgets.BudgetActionSubscriberArray{
				&budgets.BudgetActionSubscriberArgs{
					Address:          pulumi.String("example@example.example"),
					SubscriptionType: pulumi.String("EMAIL"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.Policy;
import com.pulumi.aws.iam.PolicyArgs;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.budgets.Budget;
import com.pulumi.aws.budgets.BudgetArgs;
import com.pulumi.aws.budgets.BudgetAction;
import com.pulumi.aws.budgets.BudgetActionArgs;
import com.pulumi.aws.budgets.inputs.BudgetActionActionThresholdArgs;
import com.pulumi.aws.budgets.inputs.BudgetActionDefinitionArgs;
import com.pulumi.aws.budgets.inputs.BudgetActionDefinitionIamActionDefinitionArgs;
import com.pulumi.aws.budgets.inputs.BudgetActionSubscriberArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var examplePolicy = new Policy("examplePolicy", PolicyArgs.builder()        
            .description("My example policy")
            .policy("""
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "ec2:Describe*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
            """)
            .build());

        final var current = AwsFunctions.getPartition();

        var exampleRole = new Role("exampleRole", RoleArgs.builder()        
            .assumeRolePolicy("""
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": [
          "budgets.%s"
        ]
      },
      "Action": [
        "sts:AssumeRole"
      ]
    }
  ]
}
", current.applyValue(getPartitionResult -> getPartitionResult.dnsSuffix())))
            .build());

        var exampleBudget = new Budget("exampleBudget", BudgetArgs.builder()        
            .budgetType("USAGE")
            .limitAmount("10.0")
            .limitUnit("dollars")
            .timePeriodStart("2006-01-02_15:04")
            .timeUnit("MONTHLY")
            .build());

        var exampleBudgetAction = new BudgetAction("exampleBudgetAction", BudgetActionArgs.builder()        
            .budgetName(exampleBudget.name())
            .actionType("APPLY_IAM_POLICY")
            .approvalModel("AUTOMATIC")
            .notificationType("ACTUAL")
            .executionRoleArn(exampleRole.arn())
            .actionThreshold(BudgetActionActionThresholdArgs.builder()
                .actionThresholdType("ABSOLUTE_VALUE")
                .actionThresholdValue(100)
                .build())
            .definition(BudgetActionDefinitionArgs.builder()
                .iamActionDefinition(BudgetActionDefinitionIamActionDefinitionArgs.builder()
                    .policyArn(examplePolicy.arn())
                    .roles(exampleRole.name())
                    .build())
                .build())
            .subscribers(BudgetActionSubscriberArgs.builder()
                .address("example@example.example")
                .subscriptionType("EMAIL")
                .build())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example_policy = aws.iam.Policy("examplePolicy",
    description="My example policy",
    policy="""{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "ec2:Describe*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
""")
current = aws.get_partition()
example_role = aws.iam.Role("exampleRole", assume_role_policy=f"""{{
  "Version": "2012-10-17",
  "Statement": [
    {{
      "Effect": "Allow",
      "Principal": {{
        "Service": [
          "budgets.{current.dns_suffix}"
        ]
      }},
      "Action": [
        "sts:AssumeRole"
      ]
    }}
  ]
}}
""")
example_budget = aws.budgets.Budget("exampleBudget",
    budget_type="USAGE",
    limit_amount="10.0",
    limit_unit="dollars",
    time_period_start="2006-01-02_15:04",
    time_unit="MONTHLY")
example_budget_action = aws.budgets.BudgetAction("exampleBudgetAction",
    budget_name=example_budget.name,
    action_type="APPLY_IAM_POLICY",
    approval_model="AUTOMATIC",
    notification_type="ACTUAL",
    execution_role_arn=example_role.arn,
    action_threshold=aws.budgets.BudgetActionActionThresholdArgs(
        action_threshold_type="ABSOLUTE_VALUE",
        action_threshold_value=100,
    ),
    definition=aws.budgets.BudgetActionDefinitionArgs(
        iam_action_definition=aws.budgets.BudgetActionDefinitionIamActionDefinitionArgs(
            policy_arn=example_policy.arn,
            roles=[example_role.name],
        ),
    ),
    subscribers=[aws.budgets.BudgetActionSubscriberArgs(
        address="example@example.example",
        subscription_type="EMAIL",
    )])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const examplePolicy = new aws.iam.Policy("examplePolicy", {
    description: "My example policy",
    policy: `{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "ec2:Describe*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
`,
});
const current = aws.getPartition({});
const exampleRole = new aws.iam.Role("exampleRole", {assumeRolePolicy: current.then(current => `{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": [
          "budgets.${current.dnsSuffix}"
        ]
      },
      "Action": [
        "sts:AssumeRole"
      ]
    }
  ]
}
`)});
const exampleBudget = new aws.budgets.Budget("exampleBudget", {
    budgetType: "USAGE",
    limitAmount: "10.0",
    limitUnit: "dollars",
    timePeriodStart: "2006-01-02_15:04",
    timeUnit: "MONTHLY",
});
const exampleBudgetAction = new aws.budgets.BudgetAction("exampleBudgetAction", {
    budgetName: exampleBudget.name,
    actionType: "APPLY_IAM_POLICY",
    approvalModel: "AUTOMATIC",
    notificationType: "ACTUAL",
    executionRoleArn: exampleRole.arn,
    actionThreshold: {
        actionThresholdType: "ABSOLUTE_VALUE",
        actionThresholdValue: 100,
    },
    definition: {
        iamActionDefinition: {
            policyArn: examplePolicy.arn,
            roles: [exampleRole.name],
        },
    },
    subscribers: [{
        address: "example@example.example",
        subscriptionType: "EMAIL",
    }],
});
resources:
  exampleBudgetAction:
    type: aws:budgets:BudgetAction
    properties:
      budgetName: ${exampleBudget.name}
      actionType: APPLY_IAM_POLICY
      approvalModel: AUTOMATIC
      notificationType: ACTUAL
      executionRoleArn: ${exampleRole.arn}
      actionThreshold:
        actionThresholdType: ABSOLUTE_VALUE
        actionThresholdValue: 100
      definition:
        iamActionDefinition:
          policyArn: ${examplePolicy.arn}
          roles:
            - ${exampleRole.name}
      subscribers:
        - address: example@example.example
          subscriptionType: EMAIL
  examplePolicy:
    type: aws:iam:Policy
    properties:
      description: My example policy
      policy: |
        {
          "Version": "2012-10-17",
          "Statement": [
            {
              "Action": [
                "ec2:Describe*"
              ],
              "Effect": "Allow",
              "Resource": "*"
            }
          ]
        }        
  exampleRole:
    type: aws:iam:Role
    properties:
      assumeRolePolicy: |
        {
          "Version": "2012-10-17",
          "Statement": [
            {
              "Effect": "Allow",
              "Principal": {
                "Service": [
                  "budgets.${current.dnsSuffix}"
                ]
              },
              "Action": [
                "sts:AssumeRole"
              ]
            }
          ]
        }        
  exampleBudget:
    type: aws:budgets:Budget
    properties:
      budgetType: USAGE
      limitAmount: '10.0'
      limitUnit: dollars
      timePeriodStart: 2006-01-02_15:04
      timeUnit: MONTHLY
variables:
  current:
    fn::invoke:
      Function: aws:getPartition
      Arguments: {}

Create BudgetAction Resource

new BudgetAction(name: string, args: BudgetActionArgs, opts?: CustomResourceOptions);
@overload
def BudgetAction(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 account_id: Optional[str] = None,
                 action_threshold: Optional[BudgetActionActionThresholdArgs] = None,
                 action_type: Optional[str] = None,
                 approval_model: Optional[str] = None,
                 budget_name: Optional[str] = None,
                 definition: Optional[BudgetActionDefinitionArgs] = None,
                 execution_role_arn: Optional[str] = None,
                 notification_type: Optional[str] = None,
                 subscribers: Optional[Sequence[BudgetActionSubscriberArgs]] = None)
@overload
def BudgetAction(resource_name: str,
                 args: BudgetActionArgs,
                 opts: Optional[ResourceOptions] = None)
func NewBudgetAction(ctx *Context, name string, args BudgetActionArgs, opts ...ResourceOption) (*BudgetAction, error)
public BudgetAction(string name, BudgetActionArgs args, CustomResourceOptions? opts = null)
public BudgetAction(String name, BudgetActionArgs args)
public BudgetAction(String name, BudgetActionArgs args, CustomResourceOptions options)
type: aws:budgets:BudgetAction
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BudgetActionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args BudgetActionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BudgetActionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BudgetActionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BudgetActionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BudgetAction Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The BudgetAction resource accepts the following input properties:

ActionThreshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

ActionType string

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

ApprovalModel string

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

BudgetName string

The name of a budget.

Definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

ExecutionRoleArn string

The role passed for action execution and reversion. Roles and actions must be in the same account.

NotificationType string

The type of a notification. Valid values are ACTUAL or FORECASTED.

Subscribers List<BudgetActionSubscriberArgs>

A list of subscribers. See Subscriber.

AccountId string

The ID of the target account for budget. Will use current user's account_id by default if omitted.

ActionThreshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

ActionType string

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

ApprovalModel string

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

BudgetName string

The name of a budget.

Definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

ExecutionRoleArn string

The role passed for action execution and reversion. Roles and actions must be in the same account.

NotificationType string

The type of a notification. Valid values are ACTUAL or FORECASTED.

Subscribers []BudgetActionSubscriberArgs

A list of subscribers. See Subscriber.

AccountId string

The ID of the target account for budget. Will use current user's account_id by default if omitted.

actionThreshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

actionType String

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

approvalModel String

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

budgetName String

The name of a budget.

definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

executionRoleArn String

The role passed for action execution and reversion. Roles and actions must be in the same account.

notificationType String

The type of a notification. Valid values are ACTUAL or FORECASTED.

subscribers List<BudgetActionSubscriberArgs>

A list of subscribers. See Subscriber.

accountId String

The ID of the target account for budget. Will use current user's account_id by default if omitted.

actionThreshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

actionType string

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

approvalModel string

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

budgetName string

The name of a budget.

definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

executionRoleArn string

The role passed for action execution and reversion. Roles and actions must be in the same account.

notificationType string

The type of a notification. Valid values are ACTUAL or FORECASTED.

subscribers BudgetActionSubscriberArgs[]

A list of subscribers. See Subscriber.

accountId string

The ID of the target account for budget. Will use current user's account_id by default if omitted.

action_threshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

action_type str

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

approval_model str

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

budget_name str

The name of a budget.

definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

execution_role_arn str

The role passed for action execution and reversion. Roles and actions must be in the same account.

notification_type str

The type of a notification. Valid values are ACTUAL or FORECASTED.

subscribers Sequence[BudgetActionSubscriberArgs]

A list of subscribers. See Subscriber.

account_id str

The ID of the target account for budget. Will use current user's account_id by default if omitted.

actionThreshold Property Map

The trigger threshold of the action. See Action Threshold.

actionType String

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

approvalModel String

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

budgetName String

The name of a budget.

definition Property Map

Specifies all of the type-specific parameters. See Definition.

executionRoleArn String

The role passed for action execution and reversion. Roles and actions must be in the same account.

notificationType String

The type of a notification. Valid values are ACTUAL or FORECASTED.

subscribers List<Property Map>

A list of subscribers. See Subscriber.

accountId String

The ID of the target account for budget. Will use current user's account_id by default if omitted.

Outputs

All input properties are implicitly available as output properties. Additionally, the BudgetAction resource produces the following output properties:

ActionId string

The id of the budget action.

Arn string

The ARN of the budget action.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the budget action.

ActionId string

The id of the budget action.

Arn string

The ARN of the budget action.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the budget action.

actionId String

The id of the budget action.

arn String

The ARN of the budget action.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the budget action.

actionId string

The id of the budget action.

arn string

The ARN of the budget action.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of the budget action.

action_id str

The id of the budget action.

arn str

The ARN of the budget action.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of the budget action.

actionId String

The id of the budget action.

arn String

The ARN of the budget action.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the budget action.

Look up Existing BudgetAction Resource

Get an existing BudgetAction resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BudgetActionState, opts?: CustomResourceOptions): BudgetAction
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        action_id: Optional[str] = None,
        action_threshold: Optional[BudgetActionActionThresholdArgs] = None,
        action_type: Optional[str] = None,
        approval_model: Optional[str] = None,
        arn: Optional[str] = None,
        budget_name: Optional[str] = None,
        definition: Optional[BudgetActionDefinitionArgs] = None,
        execution_role_arn: Optional[str] = None,
        notification_type: Optional[str] = None,
        status: Optional[str] = None,
        subscribers: Optional[Sequence[BudgetActionSubscriberArgs]] = None) -> BudgetAction
func GetBudgetAction(ctx *Context, name string, id IDInput, state *BudgetActionState, opts ...ResourceOption) (*BudgetAction, error)
public static BudgetAction Get(string name, Input<string> id, BudgetActionState? state, CustomResourceOptions? opts = null)
public static BudgetAction get(String name, Output<String> id, BudgetActionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccountId string

The ID of the target account for budget. Will use current user's account_id by default if omitted.

ActionId string

The id of the budget action.

ActionThreshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

ActionType string

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

ApprovalModel string

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

Arn string

The ARN of the budget action.

BudgetName string

The name of a budget.

Definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

ExecutionRoleArn string

The role passed for action execution and reversion. Roles and actions must be in the same account.

NotificationType string

The type of a notification. Valid values are ACTUAL or FORECASTED.

Status string

The status of the budget action.

Subscribers List<BudgetActionSubscriberArgs>

A list of subscribers. See Subscriber.

AccountId string

The ID of the target account for budget. Will use current user's account_id by default if omitted.

ActionId string

The id of the budget action.

ActionThreshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

ActionType string

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

ApprovalModel string

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

Arn string

The ARN of the budget action.

BudgetName string

The name of a budget.

Definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

ExecutionRoleArn string

The role passed for action execution and reversion. Roles and actions must be in the same account.

NotificationType string

The type of a notification. Valid values are ACTUAL or FORECASTED.

Status string

The status of the budget action.

Subscribers []BudgetActionSubscriberArgs

A list of subscribers. See Subscriber.

accountId String

The ID of the target account for budget. Will use current user's account_id by default if omitted.

actionId String

The id of the budget action.

actionThreshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

actionType String

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

approvalModel String

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

arn String

The ARN of the budget action.

budgetName String

The name of a budget.

definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

executionRoleArn String

The role passed for action execution and reversion. Roles and actions must be in the same account.

notificationType String

The type of a notification. Valid values are ACTUAL or FORECASTED.

status String

The status of the budget action.

subscribers List<BudgetActionSubscriberArgs>

A list of subscribers. See Subscriber.

accountId string

The ID of the target account for budget. Will use current user's account_id by default if omitted.

actionId string

The id of the budget action.

actionThreshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

actionType string

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

approvalModel string

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

arn string

The ARN of the budget action.

budgetName string

The name of a budget.

definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

executionRoleArn string

The role passed for action execution and reversion. Roles and actions must be in the same account.

notificationType string

The type of a notification. Valid values are ACTUAL or FORECASTED.

status string

The status of the budget action.

subscribers BudgetActionSubscriberArgs[]

A list of subscribers. See Subscriber.

account_id str

The ID of the target account for budget. Will use current user's account_id by default if omitted.

action_id str

The id of the budget action.

action_threshold BudgetActionActionThresholdArgs

The trigger threshold of the action. See Action Threshold.

action_type str

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

approval_model str

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

arn str

The ARN of the budget action.

budget_name str

The name of a budget.

definition BudgetActionDefinitionArgs

Specifies all of the type-specific parameters. See Definition.

execution_role_arn str

The role passed for action execution and reversion. Roles and actions must be in the same account.

notification_type str

The type of a notification. Valid values are ACTUAL or FORECASTED.

status str

The status of the budget action.

subscribers Sequence[BudgetActionSubscriberArgs]

A list of subscribers. See Subscriber.

accountId String

The ID of the target account for budget. Will use current user's account_id by default if omitted.

actionId String

The id of the budget action.

actionThreshold Property Map

The trigger threshold of the action. See Action Threshold.

actionType String

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 are APPLY_IAM_POLICY, APPLY_SCP_POLICY, and RUN_SSM_DOCUMENTS.

approvalModel String

This specifies if the action needs manual or automatic approval. Valid values are AUTOMATIC and MANUAL.

arn String

The ARN of the budget action.

budgetName String

The name of a budget.

definition Property Map

Specifies all of the type-specific parameters. See Definition.

executionRoleArn String

The role passed for action execution and reversion. Roles and actions must be in the same account.

notificationType String

The type of a notification. Valid values are ACTUAL or FORECASTED.

status String

The status of the budget action.

subscribers List<Property Map>

A list of subscribers. See Subscriber.

Supporting Types

BudgetActionActionThreshold

ActionThresholdType string

The type of threshold for a notification. Valid values are PERCENTAGE or ABSOLUTE_VALUE.

ActionThresholdValue double

The threshold of a notification.

ActionThresholdType string

The type of threshold for a notification. Valid values are PERCENTAGE or ABSOLUTE_VALUE.

ActionThresholdValue float64

The threshold of a notification.

actionThresholdType String

The type of threshold for a notification. Valid values are PERCENTAGE or ABSOLUTE_VALUE.

actionThresholdValue Double

The threshold of a notification.

actionThresholdType string

The type of threshold for a notification. Valid values are PERCENTAGE or ABSOLUTE_VALUE.

actionThresholdValue number

The threshold of a notification.

action_threshold_type str

The type of threshold for a notification. Valid values are PERCENTAGE or ABSOLUTE_VALUE.

action_threshold_value float

The threshold of a notification.

actionThresholdType String

The type of threshold for a notification. Valid values are PERCENTAGE or ABSOLUTE_VALUE.

actionThresholdValue Number

The threshold of a notification.

BudgetActionDefinition

IamActionDefinition BudgetActionDefinitionIamActionDefinition

The AWS Identity and Access Management (IAM) action definition details. See IAM Action Definition.

ScpActionDefinition BudgetActionDefinitionScpActionDefinition

The service control policies (SCPs) action definition details. See SCP Action Definition.

SsmActionDefinition BudgetActionDefinitionSsmActionDefinition

The AWS Systems Manager (SSM) action definition details. See SSM Action Definition.

IamActionDefinition BudgetActionDefinitionIamActionDefinition

The AWS Identity and Access Management (IAM) action definition details. See IAM Action Definition.

ScpActionDefinition BudgetActionDefinitionScpActionDefinition

The service control policies (SCPs) action definition details. See SCP Action Definition.

SsmActionDefinition BudgetActionDefinitionSsmActionDefinition

The AWS Systems Manager (SSM) action definition details. See SSM Action Definition.

iamActionDefinition BudgetActionDefinitionIamActionDefinition

The AWS Identity and Access Management (IAM) action definition details. See IAM Action Definition.

scpActionDefinition BudgetActionDefinitionScpActionDefinition

The service control policies (SCPs) action definition details. See SCP Action Definition.

ssmActionDefinition BudgetActionDefinitionSsmActionDefinition

The AWS Systems Manager (SSM) action definition details. See SSM Action Definition.

iamActionDefinition BudgetActionDefinitionIamActionDefinition

The AWS Identity and Access Management (IAM) action definition details. See IAM Action Definition.

scpActionDefinition BudgetActionDefinitionScpActionDefinition

The service control policies (SCPs) action definition details. See SCP Action Definition.

ssmActionDefinition BudgetActionDefinitionSsmActionDefinition

The AWS Systems Manager (SSM) action definition details. See SSM Action Definition.

iam_action_definition BudgetActionDefinitionIamActionDefinition

The AWS Identity and Access Management (IAM) action definition details. See IAM Action Definition.

scp_action_definition BudgetActionDefinitionScpActionDefinition

The service control policies (SCPs) action definition details. See SCP Action Definition.

ssm_action_definition BudgetActionDefinitionSsmActionDefinition

The AWS Systems Manager (SSM) action definition details. See SSM Action Definition.

iamActionDefinition Property Map

The AWS Identity and Access Management (IAM) action definition details. See IAM Action Definition.

scpActionDefinition Property Map

The service control policies (SCPs) action definition details. See SCP Action Definition.

ssmActionDefinition Property Map

The AWS Systems Manager (SSM) action definition details. See SSM Action Definition.

BudgetActionDefinitionIamActionDefinition

PolicyArn string

The Amazon Resource Name (ARN) of the policy to be attached.

Groups List<string>

A list of groups to be attached. There must be at least one group.

Roles List<string>

A list of roles to be attached. There must be at least one role.

Users List<string>

A list of users to be attached. There must be at least one user.

PolicyArn string

The Amazon Resource Name (ARN) of the policy to be attached.

Groups []string

A list of groups to be attached. There must be at least one group.

Roles []string

A list of roles to be attached. There must be at least one role.

Users []string

A list of users to be attached. There must be at least one user.

policyArn String

The Amazon Resource Name (ARN) of the policy to be attached.

groups List<String>

A list of groups to be attached. There must be at least one group.

roles List<String>

A list of roles to be attached. There must be at least one role.

users List<String>

A list of users to be attached. There must be at least one user.

policyArn string

The Amazon Resource Name (ARN) of the policy to be attached.

groups string[]

A list of groups to be attached. There must be at least one group.

roles string[]

A list of roles to be attached. There must be at least one role.

users string[]

A list of users to be attached. There must be at least one user.

policy_arn str

The Amazon Resource Name (ARN) of the policy to be attached.

groups Sequence[str]

A list of groups to be attached. There must be at least one group.

roles Sequence[str]

A list of roles to be attached. There must be at least one role.

users Sequence[str]

A list of users to be attached. There must be at least one user.

policyArn String

The Amazon Resource Name (ARN) of the policy to be attached.

groups List<String>

A list of groups to be attached. There must be at least one group.

roles List<String>

A list of roles to be attached. There must be at least one role.

users List<String>

A list of users to be attached. There must be at least one user.

BudgetActionDefinitionScpActionDefinition

PolicyId string

The policy ID attached.

TargetIds List<string>

A list of target IDs.

PolicyId string

The policy ID attached.

TargetIds []string

A list of target IDs.

policyId String

The policy ID attached.

targetIds List<String>

A list of target IDs.

policyId string

The policy ID attached.

targetIds string[]

A list of target IDs.

policy_id str

The policy ID attached.

target_ids Sequence[str]

A list of target IDs.

policyId String

The policy ID attached.

targetIds List<String>

A list of target IDs.

BudgetActionDefinitionSsmActionDefinition

ActionSubType string

The action subType. Valid values are STOP_EC2_INSTANCES or STOP_RDS_INSTANCES.

InstanceIds List<string>

The EC2 and RDS instance IDs.

Region string

The Region to run the SSM document.

ActionSubType string

The action subType. Valid values are STOP_EC2_INSTANCES or STOP_RDS_INSTANCES.

InstanceIds []string

The EC2 and RDS instance IDs.

Region string

The Region to run the SSM document.

actionSubType String

The action subType. Valid values are STOP_EC2_INSTANCES or STOP_RDS_INSTANCES.

instanceIds List<String>

The EC2 and RDS instance IDs.

region String

The Region to run the SSM document.

actionSubType string

The action subType. Valid values are STOP_EC2_INSTANCES or STOP_RDS_INSTANCES.

instanceIds string[]

The EC2 and RDS instance IDs.

region string

The Region to run the SSM document.

action_sub_type str

The action subType. Valid values are STOP_EC2_INSTANCES or STOP_RDS_INSTANCES.

instance_ids Sequence[str]

The EC2 and RDS instance IDs.

region str

The Region to run the SSM document.

actionSubType String

The action subType. Valid values are STOP_EC2_INSTANCES or STOP_RDS_INSTANCES.

instanceIds List<String>

The EC2 and RDS instance IDs.

region String

The Region to run the SSM document.

BudgetActionSubscriber

Address string

The address that AWS sends budget notifications to, either an SNS topic or an email.

SubscriptionType string

The type of notification that AWS sends to a subscriber. Valid values are SNS or EMAIL.

Address string

The address that AWS sends budget notifications to, either an SNS topic or an email.

SubscriptionType string

The type of notification that AWS sends to a subscriber. Valid values are SNS or EMAIL.

address String

The address that AWS sends budget notifications to, either an SNS topic or an email.

subscriptionType String

The type of notification that AWS sends to a subscriber. Valid values are SNS or EMAIL.

address string

The address that AWS sends budget notifications to, either an SNS topic or an email.

subscriptionType string

The type of notification that AWS sends to a subscriber. Valid values are SNS or EMAIL.

address str

The address that AWS sends budget notifications to, either an SNS topic or an email.

subscription_type str

The type of notification that AWS sends to a subscriber. Valid values are SNS or EMAIL.

address String

The address that AWS sends budget notifications to, either an SNS topic or an email.

subscriptionType String

The type of notification that AWS sends to a subscriber. Valid values are SNS or EMAIL.

Import

Budgets can be imported using AccountID:ActionID:BudgetName, e.g.,

 $ pulumi import aws:budgets/budgetAction:BudgetAction myBudget 123456789012:some-id:myBudget`

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.