We announced the upcoming end-of-support for the AWS CLI v1. For dates, additional details, and information on how to migrate, please refer to the linked announcement. For more information see the AWS CLI version 2 installation instructions and migration guide.
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 .
See also: AWS API Documentation
get-credits
--account-id <value>
--start-date <value>
[--end-date <value>]
[--payer-account-flag | --no-payer-account-flag]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--v2-debug]
--account-id (string)
The Amazon Web Services account ID. Must be a 12-digit numeric string.
--start-date (timestamp)
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.
--end-date (timestamp)
The end date for the credit period as Unix epoch seconds. Must not be a future date and must be on or afterstartDate. Defaults to the current date when omitted.
--payer-account-flag | --no-payer-account-flag (boolean)
Whentrueand the caller is the management account, the response aggregates credits across the entire consolidated billing family. Whenfalseor omitted, returns only credits for the specifiedaccountId.
--cli-input-json (string)
Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.
--generate-cli-skeleton (string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.
--debug (boolean)
Turn on debug logging.
--endpoint-url (string)
Override command’s default URL with the given URL.
--no-verify-ssl (boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate (boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output (string)
The formatting style for command output.
--query (string)
A JMESPath query to use in filtering the response data.
--profile (string)
Use a specific profile from your credential file.
--region (string)
The region to use. Overrides config/env settings.
--version (string)
Display the version of this tool.
--color (string)
Turn on/off color output.
--no-sign-request (boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle (string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout (int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout (int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
--v2-debug (boolean)
Enable AWS CLI v2 migration assistance. Prints warnings if the command would face a breaking change after swapping AWS CLI v1 for AWS CLI v2 in the current environment. Prints one warning for each breaking change detected.
credits -> (list)
The list of credits matching the request. Returns an empty list when no credits exist.
(structure)
Detailed information about an Amazon Web Services credit, including its identifier, type, monetary amounts, applicable products, sharing configuration, and current enabled status.
creditId -> (string)
The unique identifier for the credit.accountId -> (string)
The Amazon Web Services account ID that owns the credit.creditType -> (string)
The type of credit. Examples:Promotion,Refund,TrueUp.initialAmount -> (structure)
The initial amount of the credit when it was issued.
currencyCode -> (string)
The ISO 4217 currency code for the amount (for example,USD).currencyAmount -> (string)
The amount as a decimal string (for example,"743.21"). Negative values represent credits that reduce a bill.remainingAmount -> (structure)
The unused balance of the credit.
currencyCode -> (string)
The ISO 4217 currency code for the amount (for example,USD).currencyAmount -> (string)
The amount as a decimal string (for example,"743.21"). Negative values represent credits that reduce a bill.estimatedAmount -> (structure)
The estimated remaining balance, including in-flight (open) bills that have not yet been finalized.
currencyCode -> (string)
The ISO 4217 currency code for the amount (for example,USD).currencyAmount -> (string)
The amount as a decimal string (for example,"743.21"). Negative values represent credits that reduce a bill.applicableProductNames -> (list)
The names of Amazon Web Services services this credit applies to.
(string)
description -> (string)
A human-readable description of the credit.startDate -> (timestamp)
The date the credit becomes valid, as Unix epoch seconds.endDate -> (timestamp)
The date the credit expires, as Unix epoch seconds.exhaustDate -> (timestamp)
The date the credit balance reached zero, as Unix epoch seconds.applicationType -> (string)
When the credit is applied during bill computation. Valid values:BEFORE_CROSS_SERVICE_DISCOUNTS,AFTER_DISCOUNTS.shareableAccounts -> (list)
The Amazon Web Services account IDs entitled to apply this credit.
(string)
accountHasCreditSharingEnabled -> (boolean)
Whether the owning account has account-level credit sharing turned on.creditConsoleVisibility -> (string)
The display configuration for the credit in the Amazon Web Services Billing console.creditSharingType -> (string)
The sharing configuration for the credit. Valid values:DEFAULT,DISABLED,CUSTOM,COST_CATEGORY_RULE.costCategoryArn -> (string)
The Amazon Resource Name (ARN) of the Cost Category controlling the credit’s sharing scope. Present only whencreditSharingTypeisCOST_CATEGORY_RULE.ruleName -> (string)
The rule name within the Cost Category. Present only whencreditSharingTypeisCOST_CATEGORY_RULE.creditStatus -> (string)
Whether the credit participates in billing runs. Valid values:ENABLED,DISABLED.purchaseTypeApplications -> (list)
Restricts which purchase types this credit applies to. When
nullor omitted, the credit applies to all purchase types.(string)