# CfnBudgetsActionProps

Properties for defining a `CfnBudgetsAction`.

Used as props by: [CfnBudgetsAction](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_budgets.CfnBudgetsAction.html)

- Source: Generated at build time
- Type last changed: v2.143.0 · 24 May 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_budgets as budgets } from 'aws-cdk-lib';
const cfnBudgetsActionProps: budgets.CfnBudgetsActionProps = {
  actionThreshold: {
    type: 'type',
    value: 123,
  },
  actionType: 'actionType',
  budgetName: 'budgetName',
  definition: {
    iamActionDefinition: {
      policyArn: 'policyArn',

      // the properties below are optional
      groups: ['groups'],
      roles: ['roles'],
      users: ['users'],
    },
    scpActionDefinition: {
      policyId: 'policyId',
      targetIds: ['targetIds'],
    },
    ssmActionDefinition: {
      instanceIds: ['instanceIds'],
      region: 'region',
      subtype: 'subtype',
    },
  },
  executionRoleArn: 'executionRoleArn',
  notificationType: 'notificationType',
  subscribers: [{
    address: 'address',
    type: 'type',
  }],

  // the properties below are optional
  approvalModel: 'approvalModel',
  resourceTags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_budgets as budgets

cfn_budgets_action_props = budgets.CfnBudgetsActionProps(
    action_threshold=budgets.CfnBudgetsAction.ActionThresholdProperty(
        type="type",
        value=123
    ),
    action_type="actionType",
    budget_name="budgetName",
    definition=budgets.CfnBudgetsAction.DefinitionProperty(
        iam_action_definition=budgets.CfnBudgetsAction.IamActionDefinitionProperty(
            policy_arn="policyArn",

            # the properties below are optional
            groups=["groups"],
            roles=["roles"],
            users=["users"]
        ),
        scp_action_definition=budgets.CfnBudgetsAction.ScpActionDefinitionProperty(
            policy_id="policyId",
            target_ids=["targetIds"]
        ),
        ssm_action_definition=budgets.CfnBudgetsAction.SsmActionDefinitionProperty(
            instance_ids=["instanceIds"],
            region="region",
            subtype="subtype"
        )
    ),
    execution_role_arn="executionRoleArn",
    notification_type="notificationType",
    subscribers=[budgets.CfnBudgetsAction.SubscriberProperty(
        address="address",
        type="type"
    )],

    # the properties below are optional
    approval_model="approvalModel",
    resource_tags=[budgets.CfnBudgetsAction.ResourceTagProperty(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// 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.*;

CfnBudgetsActionProps cfnBudgetsActionProps = CfnBudgetsActionProps.builder()
        .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")
        .resourceTags(List.of(ResourceTagProperty.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Budgets;

var cfnBudgetsActionProps = new CfnBudgetsActionProps {
    ActionThreshold = new ActionThresholdProperty {
        Type = "type",
        Value = 123
    },
    ActionType = "actionType",
    BudgetName = "budgetName",
    Definition = new DefinitionProperty {
        IamActionDefinition = new IamActionDefinitionProperty {
            PolicyArn = "policyArn",

            // the properties below are optional
            Groups = new [] { "groups" },
            Roles = new [] { "roles" },
            Users = new [] { "users" }
        },
        ScpActionDefinition = new ScpActionDefinitionProperty {
            PolicyId = "policyId",
            TargetIds = new [] { "targetIds" }
        },
        SsmActionDefinition = new SsmActionDefinitionProperty {
            InstanceIds = new [] { "instanceIds" },
            Region = "region",
            Subtype = "subtype"
        }
    },
    ExecutionRoleArn = "executionRoleArn",
    NotificationType = "notificationType",
    Subscribers = new [] { new SubscriberProperty {
        Address = "address",
        Type = "type"
    } },

    // the properties below are optional
    ApprovalModel = "approvalModel",
    ResourceTags = new [] { new ResourceTagProperty {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnBudgetsActionProps := &CfnBudgetsActionProps{
	ActionThreshold: &ActionThresholdProperty{
		Type: jsii.String("type"),
		Value: jsii.Number(123),
	},
	ActionType: jsii.String("actionType"),
	BudgetName: jsii.String("budgetName"),
	Definition: &DefinitionProperty{
		IamActionDefinition: &IamActionDefinitionProperty{
			PolicyArn: jsii.String("policyArn"),

			// the properties below are optional
			Groups: []*string{
				jsii.String("groups"),
			},
			Roles: []*string{
				jsii.String("roles"),
			},
			Users: []*string{
				jsii.String("users"),
			},
		},
		ScpActionDefinition: &ScpActionDefinitionProperty{
			PolicyId: jsii.String("policyId"),
			TargetIds: []*string{
				jsii.String("targetIds"),
			},
		},
		SsmActionDefinition: &SsmActionDefinitionProperty{
			InstanceIds: []*string{
				jsii.String("instanceIds"),
			},
			Region: jsii.String("region"),
			Subtype: jsii.String("subtype"),
		},
	},
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	NotificationType: jsii.String("notificationType"),
	Subscribers: []interface{}{
		&SubscriberProperty{
			Address: jsii.String("address"),
			Type: jsii.String("type"),
		},
	},

	// the properties below are optional
	ApprovalModel: jsii.String("approvalModel"),
	ResourceTags: []ResourceTagProperty{
		&ResourceTagProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `actionThreshold`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBudgetsAction.ActionThresholdProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_budgets.CfnBudgetsAction.ActionThresholdProperty.html) (required) — The trigger threshold of the action.

- `actionType`: string (required) — 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.

- `approvalModel`: string — This specifies if the action needs manual or automatic approval.

- `budgetName`: string (required) — A string that represents the budget name.

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

- `definition`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBudgetsAction.DefinitionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_budgets.CfnBudgetsAction.DefinitionProperty.html) (required) — Specifies all of the type-specific parameters.

- `executionRoleArn`: string (required) — The role passed for action execution and reversion.

  Roles and actions must be in the same account.

- `notificationType`: string (required) — The type of a notification.

- `resourceTags`: [CfnBudgetsAction.ResourceTagProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_budgets.CfnBudgetsAction.ResourceTagProperty.html)[] — An optional list of tags to associate with the specified budget action.

  Each tag consists of a key and a value, and each key must be unique for the resource.

- `subscribers`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBudgetsAction.SubscriberProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_budgets.CfnBudgetsAction.SubscriberProperty.html)[] (required) — A list of subscribers.
