[ aws . appmonetization ]
Adds charges that you compute to the end user’s next subscription invoice. The charges go to the billing period of the user’s current subscription that contains the current time. You don’t specify a period.
Each charge has a chargeId that you choose. If you submit a chargeId again in the same billing period, the existing charge is replaced instead of added again. A chargeId belongs to the first billing period that accepts it, so use a value that is unique for this user across all billing periods, such as a UUID or your own invoice line ID.
The request succeeds or fails as a whole: either every charge is accepted or none is. A successful response means that every charge was accepted.
If you submit a chargeId after its billing period has ended, the request fails with a ConflictException . The charge is already recorded. Don’t submit it again under a new chargeId , because that bills it twice.
A billing period holds at most 100 chargeId values for each user. If a request would exceed 100, it fails with a ServiceQuotaExceededException . Submitting a chargeId that is already in the period doesn’t count toward the limit.
See also: AWS API Documentation
put-custom-charges
--app-id <value>
--user-id <value>
--charges <value>
--scope <value>
[--cli-input-json | --cli-input-yaml]
[--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>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]
--app-id (string) [required]
The ID of the app.
Constraints:
- min:
1- max:
64- pattern:
[A-Za-z0-9_-]+
--user-id (string) [required]
The end user these charges bill.
Constraints:
- min:
1- max:
128- pattern:
[A-Za-z0-9_.~-]+
--charges (list) [required]
The custom charges to add to this user’s next invoice. Stored at the submitted grain; the service never splits a charge. Accepted all-or-nothing.
Constraints:
- min:
1- max:
49(structure)
One developer-computed charge.
chargeId -> (string) [required]
Caller-chosen stable id for THIS charge. It is the idempotency and replace key: re-submitting the same chargeId within its assigned period upserts the charge in place. A chargeId is bound to the first period it is accepted into; re-submitting it after that period rolls over is refused (ConflictException) rather than billing it again, so it must be unique per charge for this user across all periods — use a UUID or your own invoice-line id (the caller does not know the billing period, so it cannot be encoded in the id).
Constraints:
- min:
1- max:
128- pattern:
[A-Za-z0-9._:-]+description -> (string) [required]
Human-readable description, surfaced on the invoice line.
Constraints:
- min:
1- max:
512amount -> (string) [required]
The charge, as a decimal string in major currency units (for example, “12.50”).
Constraints:
- min:
1- max:
20- pattern:
(0|[1-9][0-9]*)(\.[0-9]+)?currency -> (string) [required]
The ISO 4217 currency of the amount. Only USD is supported; a non-USD value is rejected.
Constraints:
- pattern:
[A-Z]{3}metricId -> (string)
Optional metric this charge derives from. Omitted for a charge not tied to a metric (a flat or custom fee).
Constraints:
- min:
1- max:
64- pattern:
[A-Za-z0-9_-]+taxCode -> (string)
Optional product tax code; defaults to the service default when omitted.
Constraints:
- min:
13- max:
13- pattern:
taas_[0-9]{8}
Shorthand Syntax:
chargeId=string,description=string,amount=string,currency=string,metricId=string,taxCode=string ...
JSON Syntax:
[
{
"chargeId": "string",
"description": "string",
"amount": "string",
"currency": "string",
"metricId": "string",
"taxCode": "string"
}
...
]
--scope (string) [required]
Required. The environment: live or sandbox.
Possible values:
sandboxlive
--cli-input-json | --cli-input-yaml (string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those 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. This may not be specified along with --cli-input-yaml.
--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. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
--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.
--cli-binary-format (string)
The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.
--no-cli-pager (boolean)
Disable cli pager for output.
--cli-auto-prompt (boolean)
Automatically prompt for CLI input parameters.
--no-cli-auto-prompt (boolean)
Disable automatically prompt for CLI input parameters.
--cli-error-format (string)
The formatting style for error output. By default, errors are displayed in enhanced format.
--help (boolean)
Display help for the command/subcommand.
billingPeriodStartAt -> (timestamp)
The billing period the service assigned these charges to, resolved from the user’s current subscription. The caller supplies no window; this reports where the charges landed.
billingPeriodEndAt -> (timestamp)
End of the assigned billing period.