Skip to content

Returns the list of Amazon Web Services account credits for the specified account

Description

Returns the list of Amazon Web Services account credits for the specified account. Each credit includes its identifier, type, monetary amounts, applicable products, expiration, sharing configuration, and current enabled status.

When the caller is the management account of a consolidated billing family and payerAccountFlag is true, the response aggregates credits across the entire family. Otherwise, the response includes only credits owned by the account specified in accountId.

Usage

billing_get_credits(accountId, startDate, endDate, payerAccountFlag)

Arguments

  • accountId

[required] The Amazon Web Services account ID. Must be a 12-digit numeric string.

  • startDate

[required] The start date for the credit period as Unix epoch seconds. Must be a past date that is not more than one year before the current date.

  • endDate

The end date for the credit period as Unix epoch seconds. Must not be a future date and must be on or after startDate. Defaults to the current date when omitted.

  • payerAccountFlag

When true and the caller is the management account, the response aggregates credits across the entire consolidated billing family. When false or omitted, returns only credits for the specified accountId.

Value

A list with the following syntax:

list(
  credits = list(
    list(
      creditId = "string",
      accountId = "string",
      creditType = "string",
      initialAmount = list(
        currencyCode = "string",
        currencyAmount = "string"
      ),
      remainingAmount = list(
        currencyCode = "string",
        currencyAmount = "string"
      ),
      estimatedAmount = list(
        currencyCode = "string",
        currencyAmount = "string"
      ),
      applicableProductNames = list(
        "string"
      ),
      description = "string",
      startDate = as.POSIXct(
        "2015-01-01"
      ),
      endDate = as.POSIXct(
        "2015-01-01"
      ),
      exhaustDate = as.POSIXct(
        "2015-01-01"
      ),
      applicationType = "BEFORE_CROSS_SERVICE_DISCOUNTS"|"AFTER_DISCOUNTS",
      shareableAccounts = list(
        "string"
      ),
      accountHasCreditSharingEnabled = TRUE|FALSE,
      creditConsoleVisibility = "string",
      creditSharingType = "DEFAULT"|"DISABLED"|"CUSTOM"|"COST_CATEGORY_RULE",
      costCategoryArn = "string",
      ruleName = "string",
      creditStatus = "ENABLED"|"DISABLED",
      purchaseTypeApplications = list(
        "string"
      )
    )
  )
)

Request syntax

svc$get_credits(
  accountId = "string",
  startDate = as.POSIXct(
    "2015-01-01"
  ),
  endDate = as.POSIXct(
    "2015-01-01"
  ),
  payerAccountFlag = TRUE|FALSE
)