Skip to content

Create Budget

budgets_create_budget R Documentation

Creates a budget and, if included, notifications and subscribers

Description

Creates a budget and, if included, notifications and subscribers.

Only one of BudgetLimit or PlannedBudgetLimits can be present in the syntax at one time. Use the syntax that matches your use case. The Request Syntax section shows the BudgetLimit syntax. For PlannedBudgetLimits, see the Examples section.

Similarly, only one set of filter and metric selections can be present in the syntax at one time. Either FilterExpression and Metrics or CostFilters and CostTypes, not both or a different combination. We recommend using FilterExpression and Metrics as they provide more flexible and powerful filtering capabilities. The Request Syntax section shows the FilterExpression/Metrics syntax.

Usage

budgets_create_budget(AccountId, Budget, NotificationsWithSubscribers,
  ResourceTags)

Arguments

AccountId

[required] The accountId that is associated with the budget.

Budget

[required] The budget object that you want to create.

NotificationsWithSubscribers

A notification that you want to associate with a budget. 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 create_budget call, Amazon Web Services creates the notifications and subscribers for you.

ResourceTags

An optional list of tags to associate with the specified budget. Each tag consists of a key and a value, and each key must be unique for the resource.

Value

An empty list.

Request syntax

svc$create_budget(
  AccountId = "string",
  Budget = list(
    BudgetName = "string",
    BudgetLimit = list(
      Amount = "string",
      Unit = "string"
    ),
    PlannedBudgetLimits = list(
      list(
        Amount = "string",
        Unit = "string"
      )
    ),
    CostFilters = list(
      list(
        "string"
      )
    ),
    CostTypes = list(
      IncludeTax = TRUE|FALSE,
      IncludeSubscription = TRUE|FALSE,
      UseBlended = TRUE|FALSE,
      IncludeRefund = TRUE|FALSE,
      IncludeCredit = TRUE|FALSE,
      IncludeUpfront = TRUE|FALSE,
      IncludeRecurring = TRUE|FALSE,
      IncludeOtherSubscription = TRUE|FALSE,
      IncludeSupport = TRUE|FALSE,
      IncludeDiscount = TRUE|FALSE,
      UseAmortized = TRUE|FALSE
    ),
    TimeUnit = "DAILY"|"MONTHLY"|"QUARTERLY"|"ANNUALLY",
    TimePeriod = list(
      Start = as.POSIXct(
        "2015-01-01"
      ),
      End = as.POSIXct(
        "2015-01-01"
      )
    ),
    CalculatedSpend = list(
      ActualSpend = list(
        Amount = "string",
        Unit = "string"
      ),
      ForecastedSpend = list(
        Amount = "string",
        Unit = "string"
      )
    ),
    BudgetType = "USAGE"|"COST"|"RI_UTILIZATION"|"RI_COVERAGE"|"SAVINGS_PLANS_UTILIZATION"|"SAVINGS_PLANS_COVERAGE",
    LastUpdatedTime = as.POSIXct(
      "2015-01-01"
    ),
    AutoAdjustData = list(
      AutoAdjustType = "HISTORICAL"|"FORECAST",
      HistoricalOptions = list(
        BudgetAdjustmentPeriod = 123,
        LookBackAvailablePeriods = 123
      ),
      LastAutoAdjustTime = as.POSIXct(
        "2015-01-01"
      )
    ),
    FilterExpression = list(
      Or = list(
        list()
      ),
      And = list(
        list()
      ),
      Not = list(),
      Dimensions = list(
        Key = "AZ"|"INSTANCE_TYPE"|"LINKED_ACCOUNT"|"LINKED_ACCOUNT_NAME"|"OPERATION"|"PURCHASE_TYPE"|"REGION"|"SERVICE"|"SERVICE_CODE"|"USAGE_TYPE"|"USAGE_TYPE_GROUP"|"RECORD_TYPE"|"OPERATING_SYSTEM"|"TENANCY"|"SCOPE"|"PLATFORM"|"SUBSCRIPTION_ID"|"LEGAL_ENTITY_NAME"|"INVOICING_ENTITY"|"DEPLOYMENT_OPTION"|"DATABASE_ENGINE"|"CACHE_ENGINE"|"INSTANCE_TYPE_FAMILY"|"BILLING_ENTITY"|"RESERVATION_ID"|"RESOURCE_ID"|"RIGHTSIZING_TYPE"|"SAVINGS_PLANS_TYPE"|"SAVINGS_PLAN_ARN"|"PAYMENT_OPTION"|"RESERVATION_MODIFIED"|"TAG_KEY"|"COST_CATEGORY_NAME",
        Values = list(
          "string"
        ),
        MatchOptions = list(
          "EQUALS"|"ABSENT"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"GREATER_THAN_OR_EQUAL"|"CASE_SENSITIVE"|"CASE_INSENSITIVE"
        )
      ),
      Tags = list(
        Key = "string",
        Values = list(
          "string"
        ),
        MatchOptions = list(
          "EQUALS"|"ABSENT"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"GREATER_THAN_OR_EQUAL"|"CASE_SENSITIVE"|"CASE_INSENSITIVE"
        )
      ),
      CostCategories = list(
        Key = "string",
        Values = list(
          "string"
        ),
        MatchOptions = list(
          "EQUALS"|"ABSENT"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"GREATER_THAN_OR_EQUAL"|"CASE_SENSITIVE"|"CASE_INSENSITIVE"
        )
      )
    ),
    Metrics = list(
      "BlendedCost"|"UnblendedCost"|"AmortizedCost"|"NetUnblendedCost"|"NetAmortizedCost"|"UsageQuantity"|"NormalizedUsageAmount"|"Hours"
    )
  ),
  NotificationsWithSubscribers = list(
    list(
      Notification = list(
        NotificationType = "ACTUAL"|"FORECASTED",
        ComparisonOperator = "GREATER_THAN"|"LESS_THAN"|"EQUAL_TO",
        Threshold = 123.0,
        ThresholdType = "PERCENTAGE"|"ABSOLUTE_VALUE",
        NotificationState = "OK"|"ALARM"
      ),
      Subscribers = list(
        list(
          SubscriptionType = "SNS"|"EMAIL",
          Address = "string"
        )
      )
    )
  ),
  ResourceTags = list(
    list(
      Key = "string",
      Value = "string"
    )
  )
)