- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
BatchUpdateBillScenarioCommitmentModificationCommand
Update a newly added or existing commitment. You can update the commitment group based on a commitment ID and a Bill scenario ID.
The BatchUpdateBillScenarioCommitmentModification
operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:UpdateBillScenarioCommitmentModification
in your policies.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { BCMPricingCalculatorClient, BatchUpdateBillScenarioCommitmentModificationCommand } from "@aws-sdk/client-bcm-pricing-calculator"; // ES Modules import
// const { BCMPricingCalculatorClient, BatchUpdateBillScenarioCommitmentModificationCommand } = require("@aws-sdk/client-bcm-pricing-calculator"); // CommonJS import
const client = new BCMPricingCalculatorClient(config);
const input = { // BatchUpdateBillScenarioCommitmentModificationRequest
billScenarioId: "STRING_VALUE", // required
commitmentModifications: [ // BatchUpdateBillScenarioCommitmentModificationEntries // required
{ // BatchUpdateBillScenarioCommitmentModificationEntry
id: "STRING_VALUE", // required
group: "STRING_VALUE",
},
],
};
const command = new BatchUpdateBillScenarioCommitmentModificationCommand(input);
const response = await client.send(command);
// { // BatchUpdateBillScenarioCommitmentModificationResponse
// items: [ // BillScenarioCommitmentModificationItems
// { // BillScenarioCommitmentModificationItem
// id: "STRING_VALUE",
// usageAccountId: "STRING_VALUE",
// group: "STRING_VALUE",
// commitmentAction: { // BillScenarioCommitmentModificationAction Union: only one key present
// addReservedInstanceAction: { // AddReservedInstanceAction
// reservedInstancesOfferingId: "STRING_VALUE",
// instanceCount: Number("int"),
// },
// addSavingsPlanAction: { // AddSavingsPlanAction
// savingsPlanOfferingId: "STRING_VALUE",
// commitment: Number("double"),
// },
// negateReservedInstanceAction: { // NegateReservedInstanceAction
// reservedInstancesId: "STRING_VALUE",
// },
// negateSavingsPlanAction: { // NegateSavingsPlanAction
// savingsPlanId: "STRING_VALUE",
// },
// },
// },
// ],
// errors: [ // BatchUpdateBillScenarioCommitmentModificationErrors
// { // BatchUpdateBillScenarioCommitmentModificationError
// id: "STRING_VALUE",
// errorCode: "BAD_REQUEST" || "NOT_FOUND" || "CONFLICT" || "INTERNAL_SERVER_ERROR",
// errorMessage: "STRING_VALUE",
// },
// ],
// };
BatchUpdateBillScenarioCommitmentModificationCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
billScenarioId Required | string | undefined | The ID of the Bill Scenario for which you want to modify the commitment group of a modeled commitment. |
commitmentModifications Required | BatchUpdateBillScenarioCommitmentModificationEntry[] | undefined | List of commitments that you want to update in a Bill Scenario. |
BatchUpdateBillScenarioCommitmentModificationCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
errors | BatchUpdateBillScenarioCommitmentModificationError[] | undefined | Returns the list of error reasons and commitment line item IDs that could not be updated for the Bill Scenario. |
items | BillScenarioCommitmentModificationItem[] | undefined | Returns the list of successful commitment line items that were updated for a Bill Scenario. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConflictException | client | The request could not be processed because of conflict in the current state of the resource. |
DataUnavailableException | client | The requested data is currently unavailable. |
ResourceNotFoundException | client | The specified resource was not found. |
AccessDeniedException | client | You do not have sufficient access to perform this action. |
InternalServerException | server | An internal error has occurred. Retry your request, but if the problem persists, contact Amazon Web Services support. |
ThrottlingException | client | The request was denied due to request throttling. |
ValidationException | client | The input provided fails to satisfy the constraints specified by an Amazon Web Services service. |
BCMPricingCalculatorServiceException | Base exception class for all service exceptions from BCMPricingCalculator service. |