aws-sdk-billing 1.27.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-billing/client.rb +293 -1
- data/lib/aws-sdk-billing/client_api.rb +237 -0
- data/lib/aws-sdk-billing/types.rb +508 -0
- data/lib/aws-sdk-billing.rb +1 -1
- data/sig/client.rbs +74 -0
- data/sig/types.rbs +131 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd74497800b13483468b0f5bc1e654d72a77122228ab35eb6c5a0a4b0db0cebe
|
|
4
|
+
data.tar.gz: 4d52b78ac9615e4eb22aa785f7d79241552205730d4ab3e758519f6dd198ba52
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 911a9539bf04468cfa687b5f69232b0ba4bea81a2375f670a2324d5a098db39ef61a24fd7020195309e97876129fe5443552e67de960e2bb57163dd1950b821e
|
|
7
|
+
data.tar.gz: e99882b0f4304d47feb0656ab68b00eeada2e820125c0cec9115ece34afb81d1ba5892f6758ac0b243b19f5ab6d3b567550f9f69f959d6fc9e7c6a1bb5ebb337
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
Unreleased Changes
|
|
2
2
|
------------------
|
|
3
3
|
|
|
4
|
+
1.28.0 (2026-07-06)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* Feature - Adds support for managing AWS account credits and billing preferences, including retrieving credit details, viewing per-month credit allocation history, redeeming promotional codes, and configuring credit sharing and billing preferences.
|
|
8
|
+
|
|
4
9
|
1.27.0 (2026-05-26)
|
|
5
10
|
------------------
|
|
6
11
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.28.0
|
|
@@ -741,6 +741,70 @@ module Aws::Billing
|
|
|
741
741
|
req.send_request(options)
|
|
742
742
|
end
|
|
743
743
|
|
|
744
|
+
# Retrieves billing preferences for the specified feature. Each feature
|
|
745
|
+
# controls a distinct billing capability: which accounts can share
|
|
746
|
+
# Reserved Instances or credits, whether billing alerts are enabled, the
|
|
747
|
+
# historical record of sharing changes, and per-credit options.
|
|
748
|
+
#
|
|
749
|
+
# @option params [String] :next_token
|
|
750
|
+
# Pagination token from a previous response. Pass the value returned in
|
|
751
|
+
# `nextToken` to retrieve the next page of results.
|
|
752
|
+
#
|
|
753
|
+
# @option params [Integer] :max_results
|
|
754
|
+
# The maximum number of records to return per page. Range: 1 to 50.
|
|
755
|
+
# Default: 50.
|
|
756
|
+
#
|
|
757
|
+
# @option params [required, Array<String>] :features
|
|
758
|
+
# The feature to retrieve. Specify exactly one value. Valid values:
|
|
759
|
+
# `BILLING_ALERTS`, `RI_SHARING`, `RI_SHARING_HISTORY`,
|
|
760
|
+
# `CREDIT_SHARING`, `CREDIT_SHARING_HISTORY`, `CREDIT_LEVEL_SHARING`,
|
|
761
|
+
# `CREDIT_PREFERENCE_OPTIONS`.
|
|
762
|
+
#
|
|
763
|
+
# @option params [Array<Types::BillingFeatureFilter>] :filters
|
|
764
|
+
# Filters to narrow results. Specify exactly one filter when supplied.
|
|
765
|
+
# The supported filter name is `PREFERENCE_KEY`, which accepts 1 to 10
|
|
766
|
+
# values to match preference keys.
|
|
767
|
+
#
|
|
768
|
+
# @return [Types::GetBillingPreferencesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
769
|
+
#
|
|
770
|
+
# * {Types::GetBillingPreferencesResponse#billing_preferences #billing_preferences} => Array<Types::BillingPreferenceSummary>
|
|
771
|
+
# * {Types::GetBillingPreferencesResponse#next_token #next_token} => String
|
|
772
|
+
#
|
|
773
|
+
# @example Request syntax with placeholder values
|
|
774
|
+
#
|
|
775
|
+
# resp = client.get_billing_preferences({
|
|
776
|
+
# next_token: "PageToken",
|
|
777
|
+
# max_results: 1,
|
|
778
|
+
# features: ["RI_SHARING"], # required, accepts RI_SHARING, RI_SHARING_HISTORY, CREDIT_SHARING, CREDIT_SHARING_HISTORY, CREDIT_LEVEL_SHARING, BILLING_ALERTS, CREDIT_PREFERENCE_OPTIONS
|
|
779
|
+
# filters: [
|
|
780
|
+
# {
|
|
781
|
+
# name: "PREFERENCE_KEY", # accepts PREFERENCE_KEY
|
|
782
|
+
# value: ["BillingFeatureFilterValue"],
|
|
783
|
+
# },
|
|
784
|
+
# ],
|
|
785
|
+
# })
|
|
786
|
+
#
|
|
787
|
+
# @example Response structure
|
|
788
|
+
#
|
|
789
|
+
# resp.billing_preferences #=> Array
|
|
790
|
+
# resp.billing_preferences[0].feature #=> String, one of "RI_SHARING", "RI_SHARING_HISTORY", "CREDIT_SHARING", "CREDIT_SHARING_HISTORY", "CREDIT_LEVEL_SHARING", "BILLING_ALERTS", "CREDIT_PREFERENCE_OPTIONS"
|
|
791
|
+
# resp.billing_preferences[0].key #=> String
|
|
792
|
+
# resp.billing_preferences[0].value #=> String, one of "ENABLED", "DISABLED"
|
|
793
|
+
# resp.billing_preferences[0].account_name #=> String
|
|
794
|
+
# resp.billing_preferences[0].account_id #=> String
|
|
795
|
+
# resp.billing_preferences[0].billing_period.year #=> Integer
|
|
796
|
+
# resp.billing_preferences[0].billing_period.month #=> Integer
|
|
797
|
+
# resp.next_token #=> String
|
|
798
|
+
#
|
|
799
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/billing-2023-09-07/GetBillingPreferences AWS API Documentation
|
|
800
|
+
#
|
|
801
|
+
# @overload get_billing_preferences(params = {})
|
|
802
|
+
# @param [Hash] params ({})
|
|
803
|
+
def get_billing_preferences(params = {}, options = {})
|
|
804
|
+
req = build_request(:get_billing_preferences, params)
|
|
805
|
+
req.send_request(options)
|
|
806
|
+
end
|
|
807
|
+
|
|
744
808
|
# Returns the metadata associated to the specified billing view ARN.
|
|
745
809
|
#
|
|
746
810
|
# @option params [required, String] :arn
|
|
@@ -820,6 +884,160 @@ module Aws::Billing
|
|
|
820
884
|
req.send_request(options)
|
|
821
885
|
end
|
|
822
886
|
|
|
887
|
+
# Returns the per-billing-month allocation history for credits applied
|
|
888
|
+
# to an Amazon Web Services account's bills. Traverses the consolidated
|
|
889
|
+
# billing family to capture cross-account credit applications. Supports
|
|
890
|
+
# pagination and optional filtering to a single credit.
|
|
891
|
+
#
|
|
892
|
+
# @option params [required, String] :account_id
|
|
893
|
+
# The Amazon Web Services account ID whose allocation history to
|
|
894
|
+
# retrieve. Must be a 12-digit numeric string.
|
|
895
|
+
#
|
|
896
|
+
# @option params [Integer] :credit_id
|
|
897
|
+
# Filters the result to a single credit. When omitted, returns
|
|
898
|
+
# allocation entries for all credits.
|
|
899
|
+
#
|
|
900
|
+
# @option params [required, Time,DateTime,Date,Integer,String] :start_date
|
|
901
|
+
# Inclusive start date as Unix epoch seconds. Must be on or before
|
|
902
|
+
# `endDate`. The range from `startDate` to `endDate` cannot exceed 24
|
|
903
|
+
# billing months.
|
|
904
|
+
#
|
|
905
|
+
# @option params [required, Time,DateTime,Date,Integer,String] :end_date
|
|
906
|
+
# Inclusive end date as Unix epoch seconds.
|
|
907
|
+
#
|
|
908
|
+
# @option params [String] :next_token
|
|
909
|
+
# Pagination token from a previous response. Pass the value returned in
|
|
910
|
+
# `nextToken` to retrieve the next page of results.
|
|
911
|
+
#
|
|
912
|
+
# @option params [Integer] :max_results
|
|
913
|
+
# The maximum number of records to return per page. Range: 1 to 1000.
|
|
914
|
+
# Default: 100.
|
|
915
|
+
#
|
|
916
|
+
# @return [Types::GetCreditAllocationHistoryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
917
|
+
#
|
|
918
|
+
# * {Types::GetCreditAllocationHistoryResponse#credit_allocation_history_list #credit_allocation_history_list} => Array<Types::CreditAllocationHistoryEntry>
|
|
919
|
+
# * {Types::GetCreditAllocationHistoryResponse#partial_results #partial_results} => Boolean
|
|
920
|
+
# * {Types::GetCreditAllocationHistoryResponse#failed_months #failed_months} => Array<String>
|
|
921
|
+
# * {Types::GetCreditAllocationHistoryResponse#next_token #next_token} => String
|
|
922
|
+
#
|
|
923
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
|
924
|
+
#
|
|
925
|
+
# @example Request syntax with placeholder values
|
|
926
|
+
#
|
|
927
|
+
# resp = client.get_credit_allocation_history({
|
|
928
|
+
# account_id: "AccountId", # required
|
|
929
|
+
# credit_id: 1,
|
|
930
|
+
# start_date: Time.now, # required
|
|
931
|
+
# end_date: Time.now, # required
|
|
932
|
+
# next_token: "PageToken",
|
|
933
|
+
# max_results: 1,
|
|
934
|
+
# })
|
|
935
|
+
#
|
|
936
|
+
# @example Response structure
|
|
937
|
+
#
|
|
938
|
+
# resp.credit_allocation_history_list #=> Array
|
|
939
|
+
# resp.credit_allocation_history_list[0].credit_id #=> String
|
|
940
|
+
# resp.credit_allocation_history_list[0].credit_amount.currency_code #=> String
|
|
941
|
+
# resp.credit_allocation_history_list[0].credit_amount.currency_amount #=> String
|
|
942
|
+
# resp.credit_allocation_history_list[0].description #=> String
|
|
943
|
+
# resp.credit_allocation_history_list[0].account_id #=> String
|
|
944
|
+
# resp.credit_allocation_history_list[0].applied_service_name #=> String
|
|
945
|
+
# resp.credit_allocation_history_list[0].billing_month #=> String
|
|
946
|
+
# resp.credit_allocation_history_list[0].is_estimated_bill #=> Boolean
|
|
947
|
+
# resp.partial_results #=> Boolean
|
|
948
|
+
# resp.failed_months #=> Array
|
|
949
|
+
# resp.failed_months[0] #=> String
|
|
950
|
+
# resp.next_token #=> String
|
|
951
|
+
#
|
|
952
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/billing-2023-09-07/GetCreditAllocationHistory AWS API Documentation
|
|
953
|
+
#
|
|
954
|
+
# @overload get_credit_allocation_history(params = {})
|
|
955
|
+
# @param [Hash] params ({})
|
|
956
|
+
def get_credit_allocation_history(params = {}, options = {})
|
|
957
|
+
req = build_request(:get_credit_allocation_history, params)
|
|
958
|
+
req.send_request(options)
|
|
959
|
+
end
|
|
960
|
+
|
|
961
|
+
# Returns the list of Amazon Web Services account credits for the
|
|
962
|
+
# specified account. Each credit includes its identifier, type, monetary
|
|
963
|
+
# amounts, applicable products, expiration, sharing configuration, and
|
|
964
|
+
# current enabled status.
|
|
965
|
+
#
|
|
966
|
+
# When the caller is the management account of a consolidated billing
|
|
967
|
+
# family and `payerAccountFlag` is `true`, the response aggregates
|
|
968
|
+
# credits across the entire family. Otherwise, the response includes
|
|
969
|
+
# only credits owned by the account specified in `accountId`.
|
|
970
|
+
#
|
|
971
|
+
# @option params [required, String] :account_id
|
|
972
|
+
# The Amazon Web Services account ID. Must be a 12-digit numeric string.
|
|
973
|
+
#
|
|
974
|
+
# @option params [required, Time,DateTime,Date,Integer,String] :start_date
|
|
975
|
+
# The start date for the credit period as Unix epoch seconds. Must be a
|
|
976
|
+
# past date that is not more than one year before the current date.
|
|
977
|
+
#
|
|
978
|
+
# @option params [Time,DateTime,Date,Integer,String] :end_date
|
|
979
|
+
# The end date for the credit period as Unix epoch seconds. Must not be
|
|
980
|
+
# a future date and must be on or after `startDate`. Defaults to the
|
|
981
|
+
# current date when omitted.
|
|
982
|
+
#
|
|
983
|
+
# @option params [Boolean] :payer_account_flag
|
|
984
|
+
# When `true` and the caller is the management account, the response
|
|
985
|
+
# aggregates credits across the entire consolidated billing family. When
|
|
986
|
+
# `false` or omitted, returns only credits for the specified
|
|
987
|
+
# `accountId`.
|
|
988
|
+
#
|
|
989
|
+
# @return [Types::GetCreditsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
990
|
+
#
|
|
991
|
+
# * {Types::GetCreditsResponse#credits #credits} => Array<Types::CreditData>
|
|
992
|
+
#
|
|
993
|
+
# @example Request syntax with placeholder values
|
|
994
|
+
#
|
|
995
|
+
# resp = client.get_credits({
|
|
996
|
+
# account_id: "String", # required
|
|
997
|
+
# start_date: Time.now, # required
|
|
998
|
+
# end_date: Time.now,
|
|
999
|
+
# payer_account_flag: false,
|
|
1000
|
+
# })
|
|
1001
|
+
#
|
|
1002
|
+
# @example Response structure
|
|
1003
|
+
#
|
|
1004
|
+
# resp.credits #=> Array
|
|
1005
|
+
# resp.credits[0].credit_id #=> String
|
|
1006
|
+
# resp.credits[0].account_id #=> String
|
|
1007
|
+
# resp.credits[0].credit_type #=> String
|
|
1008
|
+
# resp.credits[0].initial_amount.currency_code #=> String
|
|
1009
|
+
# resp.credits[0].initial_amount.currency_amount #=> String
|
|
1010
|
+
# resp.credits[0].remaining_amount.currency_code #=> String
|
|
1011
|
+
# resp.credits[0].remaining_amount.currency_amount #=> String
|
|
1012
|
+
# resp.credits[0].estimated_amount.currency_code #=> String
|
|
1013
|
+
# resp.credits[0].estimated_amount.currency_amount #=> String
|
|
1014
|
+
# resp.credits[0].applicable_product_names #=> Array
|
|
1015
|
+
# resp.credits[0].applicable_product_names[0] #=> String
|
|
1016
|
+
# resp.credits[0].description #=> String
|
|
1017
|
+
# resp.credits[0].start_date #=> Time
|
|
1018
|
+
# resp.credits[0].end_date #=> Time
|
|
1019
|
+
# resp.credits[0].exhaust_date #=> Time
|
|
1020
|
+
# resp.credits[0].application_type #=> String, one of "BEFORE_CROSS_SERVICE_DISCOUNTS", "AFTER_DISCOUNTS"
|
|
1021
|
+
# resp.credits[0].shareable_accounts #=> Array
|
|
1022
|
+
# resp.credits[0].shareable_accounts[0] #=> String
|
|
1023
|
+
# resp.credits[0].account_has_credit_sharing_enabled #=> Boolean
|
|
1024
|
+
# resp.credits[0].credit_console_visibility #=> String
|
|
1025
|
+
# resp.credits[0].credit_sharing_type #=> String, one of "DEFAULT", "DISABLED", "CUSTOM", "COST_CATEGORY_RULE"
|
|
1026
|
+
# resp.credits[0].cost_category_arn #=> String
|
|
1027
|
+
# resp.credits[0].rule_name #=> String
|
|
1028
|
+
# resp.credits[0].credit_status #=> String, one of "ENABLED", "DISABLED"
|
|
1029
|
+
# resp.credits[0].purchase_type_applications #=> Array
|
|
1030
|
+
# resp.credits[0].purchase_type_applications[0] #=> String
|
|
1031
|
+
#
|
|
1032
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/billing-2023-09-07/GetCredits AWS API Documentation
|
|
1033
|
+
#
|
|
1034
|
+
# @overload get_credits(params = {})
|
|
1035
|
+
# @param [Hash] params ({})
|
|
1036
|
+
def get_credits(params = {}, options = {})
|
|
1037
|
+
req = build_request(:get_credits, params)
|
|
1038
|
+
req.send_request(options)
|
|
1039
|
+
end
|
|
1040
|
+
|
|
823
1041
|
# Returns the resource-based policy document attached to the resource in
|
|
824
1042
|
# `JSON` format.
|
|
825
1043
|
#
|
|
@@ -1092,6 +1310,33 @@ module Aws::Billing
|
|
|
1092
1310
|
req.send_request(options)
|
|
1093
1311
|
end
|
|
1094
1312
|
|
|
1313
|
+
# Redeems an Amazon Web Services promotional credit code on behalf of
|
|
1314
|
+
# the calling account. On success, a new credit is added to the
|
|
1315
|
+
# account's credit ledger with the amount, validity period, and
|
|
1316
|
+
# applicable products defined by the promotion. The credit is then
|
|
1317
|
+
# automatically applied to subsequent bills according to the standard
|
|
1318
|
+
# credit application order.
|
|
1319
|
+
#
|
|
1320
|
+
# @option params [required, String] :promo_code
|
|
1321
|
+
# The promotional credit code to redeem.
|
|
1322
|
+
#
|
|
1323
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
|
1324
|
+
#
|
|
1325
|
+
# @example Request syntax with placeholder values
|
|
1326
|
+
#
|
|
1327
|
+
# resp = client.redeem_credits({
|
|
1328
|
+
# promo_code: "PromoCode", # required
|
|
1329
|
+
# })
|
|
1330
|
+
#
|
|
1331
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/billing-2023-09-07/RedeemCredits AWS API Documentation
|
|
1332
|
+
#
|
|
1333
|
+
# @overload redeem_credits(params = {})
|
|
1334
|
+
# @param [Hash] params ({})
|
|
1335
|
+
def redeem_credits(params = {}, options = {})
|
|
1336
|
+
req = build_request(:redeem_credits, params)
|
|
1337
|
+
req.send_request(options)
|
|
1338
|
+
end
|
|
1339
|
+
|
|
1095
1340
|
# An API operation for adding one or more tags (key-value pairs) to a
|
|
1096
1341
|
# resource.
|
|
1097
1342
|
#
|
|
@@ -1182,6 +1427,53 @@ module Aws::Billing
|
|
|
1182
1427
|
req.send_request(options)
|
|
1183
1428
|
end
|
|
1184
1429
|
|
|
1430
|
+
# Updates billing preferences for the specified feature. Each feature
|
|
1431
|
+
# targets a distinct billing capability and has its own set of supported
|
|
1432
|
+
# keys. The action sets the value for each provided key; keys not
|
|
1433
|
+
# present in the request are unchanged.
|
|
1434
|
+
#
|
|
1435
|
+
# Sharing keys (`RI_SHARING`, `CREDIT_SHARING`, `CREDIT_LEVEL_SHARING`,
|
|
1436
|
+
# and sharing keys under `CREDIT_PREFERENCE_OPTIONS`) may only be set by
|
|
1437
|
+
# the management account of a consolidated billing family. The
|
|
1438
|
+
# `credit/{creditId}/status` key may be set by member accounts for
|
|
1439
|
+
# credits they own, or by the management account for any credit in the
|
|
1440
|
+
# family.
|
|
1441
|
+
#
|
|
1442
|
+
# @option params [required, String] :feature
|
|
1443
|
+
# The feature to update. Valid values: `BILLING_ALERTS`, `RI_SHARING`,
|
|
1444
|
+
# `CREDIT_SHARING`, `CREDIT_LEVEL_SHARING`, `CREDIT_PREFERENCE_OPTIONS`.
|
|
1445
|
+
# The history features (`RI_SHARING_HISTORY` and
|
|
1446
|
+
# `CREDIT_SHARING_HISTORY`) are read-only and cannot be updated.
|
|
1447
|
+
#
|
|
1448
|
+
# @option params [required, Array<Types::BillingPreferenceForKey>] :billing_preferences_per_key
|
|
1449
|
+
# Key/value pairs to apply. All keys in a single request must be valid
|
|
1450
|
+
# for the specified `feature` and must not be duplicated. For
|
|
1451
|
+
# `CREDIT_PREFERENCE_OPTIONS`, all keys must reference the same
|
|
1452
|
+
# `creditId`.
|
|
1453
|
+
#
|
|
1454
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
|
1455
|
+
#
|
|
1456
|
+
# @example Request syntax with placeholder values
|
|
1457
|
+
#
|
|
1458
|
+
# resp = client.update_billing_preferences({
|
|
1459
|
+
# feature: "RI_SHARING", # required, accepts RI_SHARING, RI_SHARING_HISTORY, CREDIT_SHARING, CREDIT_SHARING_HISTORY, CREDIT_LEVEL_SHARING, BILLING_ALERTS, CREDIT_PREFERENCE_OPTIONS
|
|
1460
|
+
# billing_preferences_per_key: [ # required
|
|
1461
|
+
# {
|
|
1462
|
+
# key: "PreferenceKey", # required
|
|
1463
|
+
# value: "ENABLED", # required, accepts ENABLED, DISABLED
|
|
1464
|
+
# },
|
|
1465
|
+
# ],
|
|
1466
|
+
# })
|
|
1467
|
+
#
|
|
1468
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/billing-2023-09-07/UpdateBillingPreferences AWS API Documentation
|
|
1469
|
+
#
|
|
1470
|
+
# @overload update_billing_preferences(params = {})
|
|
1471
|
+
# @param [Hash] params ({})
|
|
1472
|
+
def update_billing_preferences(params = {}, options = {})
|
|
1473
|
+
req = build_request(:update_billing_preferences, params)
|
|
1474
|
+
req.send_request(options)
|
|
1475
|
+
end
|
|
1476
|
+
|
|
1185
1477
|
# An API to update the attributes of the billing view.
|
|
1186
1478
|
#
|
|
1187
1479
|
# @option params [required, String] :arn
|
|
@@ -1288,7 +1580,7 @@ module Aws::Billing
|
|
|
1288
1580
|
tracer: tracer
|
|
1289
1581
|
)
|
|
1290
1582
|
context[:gem_name] = 'aws-sdk-billing'
|
|
1291
|
-
context[:gem_version] = '1.
|
|
1583
|
+
context[:gem_version] = '1.28.0'
|
|
1292
1584
|
Seahorse::Client::Request.new(handlers, context)
|
|
1293
1585
|
end
|
|
1294
1586
|
|