@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:35.540Z") public class CfnBudget extends CfnResource implements IInspectable
The AWS::Budgets::Budget
resource allows customers to take pre-defined actions that will trigger once a budget threshold has been exceeded. creates, replaces, or deletes budgets for Billing and Cost Management. 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.*; Object costFilters; Object plannedBudgetLimits; CfnBudget cfnBudget = CfnBudget.Builder.create(this, "MyCfnBudget") .budget(BudgetDataProperty.builder() .budgetType("budgetType") .timeUnit("timeUnit") // the properties below are optional .autoAdjustData(AutoAdjustDataProperty.builder() .autoAdjustType("autoAdjustType") // the properties below are optional .historicalOptions(HistoricalOptionsProperty.builder() .budgetAdjustmentPeriod(123) .build()) .build()) .budgetLimit(SpendProperty.builder() .amount(123) .unit("unit") .build()) .budgetName("budgetName") .costFilters(costFilters) .costTypes(CostTypesProperty.builder() .includeCredit(false) .includeDiscount(false) .includeOtherSubscription(false) .includeRecurring(false) .includeRefund(false) .includeSubscription(false) .includeSupport(false) .includeTax(false) .includeUpfront(false) .useAmortized(false) .useBlended(false) .build()) .plannedBudgetLimits(plannedBudgetLimits) .timePeriod(TimePeriodProperty.builder() .end("end") .start("start") .build()) .build()) // the properties below are optional .notificationsWithSubscribers(List.of(NotificationWithSubscribersProperty.builder() .notification(NotificationProperty.builder() .comparisonOperator("comparisonOperator") .notificationType("notificationType") .threshold(123) // the properties below are optional .thresholdType("thresholdType") .build()) .subscribers(List.of(SubscriberProperty.builder() .address("address") .subscriptionType("subscriptionType") .build())) .build())) .build();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnBudget.AutoAdjustDataProperty
The parameters that determine the budget amount for an auto-adjusting budget.
|
static interface |
CfnBudget.BudgetDataProperty
Represents the output of the `CreateBudget` operation.
|
static class |
CfnBudget.Builder
A fluent builder for
CfnBudget . |
static interface |
CfnBudget.CostTypesProperty
The types of cost that are included in a `COST` budget, such as tax and subscriptions.
|
static interface |
CfnBudget.HistoricalOptionsProperty
The parameters that define or describe the historical data that your auto-adjusting budget is based on.
|
static interface |
CfnBudget.NotificationProperty
A notification that's associated with a budget.
|
static interface |
CfnBudget.NotificationWithSubscribersProperty
A notification with subscribers.
|
static interface |
CfnBudget.SpendProperty
The amount of cost or usage that's measured for a budget.
|
static interface |
CfnBudget.SubscriberProperty
The `Subscriber` property type specifies who to notify for a Billing and Cost Management budget notification.
|
static interface |
CfnBudget.TimePeriodProperty
The period of time that is covered by a budget.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnBudget(Construct scope,
java.lang.String id,
CfnBudgetProps props)
Create a new `AWS::Budgets::Budget`.
|
protected |
CfnBudget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnBudget(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getBudget()
The budget object that you want to create.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getNotificationsWithSubscribers()
A notification that you want to associate with a budget.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setBudget(CfnBudget.BudgetDataProperty value)
The budget object that you want to create.
|
void |
setBudget(IResolvable value)
The budget object that you want to create.
|
void |
setNotificationsWithSubscribers(IResolvable value)
A notification that you want to associate with a budget.
|
void |
setNotificationsWithSubscribers(java.util.List<java.lang.Object> value)
A notification that you want to associate with a budget.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnBudget(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnBudget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnBudget(Construct scope, java.lang.String id, CfnBudgetProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.Object getBudget()
public void setBudget(CfnBudget.BudgetDataProperty value)
public void setBudget(IResolvable value)
public java.lang.Object getNotificationsWithSubscribers()
A budget can have up to five notifications, and each notification can have one SNS subscriber and up to 10 email subscribers. If you include notifications and subscribers in your CreateBudget
call, AWS creates the notifications and subscribers for you.
public void setNotificationsWithSubscribers(IResolvable value)
A budget can have up to five notifications, and each notification can have one SNS subscriber and up to 10 email subscribers. If you include notifications and subscribers in your CreateBudget
call, AWS creates the notifications and subscribers for you.
public void setNotificationsWithSubscribers(java.util.List<java.lang.Object> value)
A budget can have up to five notifications, and each notification can have one SNS subscriber and up to 10 email subscribers. If you include notifications and subscribers in your CreateBudget
call, AWS creates the notifications and subscribers for you.