

# CreateBillEstimate
<a name="API_AWSBCMPricingCalculator_CreateBillEstimate"></a>

 Create a Bill estimate from a Bill scenario. In the Bill scenario you can model usage addition, usage changes, and usage removal. You can also model commitment addition and commitment removal. After all changes in a Bill scenario is made satisfactorily, you can call this API with a Bill scenario ID to generate the Bill estimate. Bill estimate calculates the pre-tax cost for your consolidated billing family, incorporating all modeled usage and commitments alongside existing usage and commitments from your most recent completed anniversary bill, with any applicable discounts applied. 

## Request Syntax
<a name="API_AWSBCMPricingCalculator_CreateBillEstimate_RequestSyntax"></a>

```
{
   "billScenarioId": "string",
   "clientToken": "string",
   "name": "string",
   "tags": { 
      "string" : "string" 
   }
}
```

## Request Parameters
<a name="API_AWSBCMPricingCalculator_CreateBillEstimate_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [billScenarioId](#API_AWSBCMPricingCalculator_CreateBillEstimate_RequestSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-request-billScenarioId"></a>
 The ID of the Bill Scenario for which you want to create a Bill estimate.   
Type: String  
Length Constraints: Fixed length of 36.  
Pattern: `[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}`   
Required: Yes

 ** [clientToken](#API_AWSBCMPricingCalculator_CreateBillEstimate_RequestSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-request-clientToken"></a>
 A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[\u0021-\u007E]+`   
Required: No

 ** [name](#API_AWSBCMPricingCalculator_CreateBillEstimate_RequestSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-request-name"></a>
 The name of the Bill estimate that will be created. Names must be unique for an account.   
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 64.  
Pattern: `[a-zA-Z0-9-]+`   
Required: Yes

 ** [tags](#API_AWSBCMPricingCalculator_CreateBillEstimate_RequestSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-request-tags"></a>
 An optional list of tags to associate with the specified BillEstimate. You can use resource tags to control access to your BillEstimate using IAM policies. Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:   
+ Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for AWS. 
+ The maximum length of a key is 128 characters.
+ The maximum length of a value is 256 characters.
+ Keys and values can only contain alphanumeric characters, spaces, and any of the following: `_.:/=+@-`.
+ Keys and values are case sensitive.
+ Keys and values are trimmed for any leading or trailing whitespaces.
+ Don't use `aws:` as a prefix for your keys. This prefix is reserved for AWS.
Type: String to string map  
Map Entries: Minimum number of 0 items. Maximum number of 200 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Key Pattern: `[\w\s:+=@/-]+`   
Value Length Constraints: Minimum length of 0. Maximum length of 256.  
Value Pattern: `[\w\s:+=@/-]*`   
Required: No

## Response Syntax
<a name="API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax"></a>

```
{
   "billInterval": { 
      "end": number,
      "start": number
   },
   "costCategoryGroupSharingPreferenceArn": "string",
   "costCategoryGroupSharingPreferenceEffectiveDate": number,
   "costSummary": { 
      "serviceCostDifferences": { 
         "string" : { 
            "estimatedCost": { 
               "amount": number,
               "currency": "string"
            },
            "historicalCost": { 
               "amount": number,
               "currency": "string"
            }
         }
      },
      "totalCostDifference": { 
         "estimatedCost": { 
            "amount": number,
            "currency": "string"
         },
         "historicalCost": { 
            "amount": number,
            "currency": "string"
         }
      }
   },
   "createdAt": number,
   "expiresAt": number,
   "failureMessage": "string",
   "groupSharingPreference": "string",
   "id": "string",
   "name": "string",
   "status": "string"
}
```

## Response Elements
<a name="API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [billInterval](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-billInterval"></a>
 The bill month start and end timestamp that was used to create the Bill estimate. This is set to the last complete anniversary bill month start and end timestamp.   
Type: [BillInterval](API_AWSBCMPricingCalculator_BillInterval.md) object

 ** [costCategoryGroupSharingPreferenceArn](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-costCategoryGroupSharingPreferenceArn"></a>
The arn of the cost category used in the reserved and prioritized group sharing.  
Type: String  
Length Constraints: Minimum length of 20. Maximum length of 2048.  
Pattern: `arn:aws[-a-z0-9]*:ce::[0-9]{12}:costcategory/[a-f0-9-]{36}` 

 ** [costCategoryGroupSharingPreferenceEffectiveDate](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-costCategoryGroupSharingPreferenceEffectiveDate"></a>
Timestamp of the effective date of the cost category used in the group sharing settings.  
Type: Timestamp

 ** [costSummary](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-costSummary"></a>
 Returns summary-level cost information once a Bill estimate is successfully generated. This summary includes: 1) the total cost difference, showing the pre-tax cost change for the consolidated billing family between the completed anniversary bill and the estimated bill, and 2) total cost differences per service, detailing the pre-tax cost of each service, comparing the completed anniversary bill to the estimated bill on a per-service basis.   
Type: [BillEstimateCostSummary](API_AWSBCMPricingCalculator_BillEstimateCostSummary.md) object

 ** [createdAt](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-createdAt"></a>
 The timestamp of when the Bill estimate create process was started (not when it successfully completed or failed).   
Type: Timestamp

 ** [expiresAt](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-expiresAt"></a>
 The timestamp of when the Bill estimate will expire. A Bill estimate becomes inaccessible after expiration.   
Type: Timestamp

 ** [failureMessage](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-failureMessage"></a>
 This attribute provides the reason if a Bill estimate result generation fails.   
Type: String

 ** [groupSharingPreference](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-groupSharingPreference"></a>
The setting for the reserved instance and savings plans group sharing used in this estimate.  
Type: String  
Valid Values: `OPEN | PRIORITIZED | RESTRICTED` 

 ** [id](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-id"></a>
 The unique identifier of your newly created Bill estimate.   
Type: String  
Length Constraints: Fixed length of 36.  
Pattern: `[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}` 

 ** [name](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-name"></a>
 The name of your newly created Bill estimate.   
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 64.  
Pattern: `[a-zA-Z0-9-]+` 

 ** [status](#API_AWSBCMPricingCalculator_CreateBillEstimate_ResponseSyntax) **   <a name="awscostmanagement-AWSBCMPricingCalculator_CreateBillEstimate-response-status"></a>
 The status of your newly created Bill estimate. Bill estimate creation can take anywhere between 8 to 12 hours. The status will allow you to identify when the Bill estimate is complete or has failed.   
Type: String  
Valid Values: `IN_PROGRESS | COMPLETE | FAILED` 

## Errors
<a name="API_AWSBCMPricingCalculator_CreateBillEstimate_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
 You do not have sufficient access to perform this action.   
HTTP Status Code: 400

 ** ConflictException **   
 The request could not be processed because of conflict in the current state of the resource.     
 ** resourceId **   
 The identifier of the resource that was not found.   
 ** resourceType **   
 The type of the resource that was not found. 
HTTP Status Code: 400

 ** DataUnavailableException **   
 The requested data is currently unavailable.   
HTTP Status Code: 400

 ** InternalServerException **   
 An internal error has occurred. Retry your request, but if the problem persists, contact AWS support.     
 ** retryAfterSeconds **   
 An internal error has occurred. Retry your request, but if the problem persists, contact AWS support. 
HTTP Status Code: 500

 ** ResourceNotFoundException **   
 The specified resource was not found.     
 ** resourceId **   
 The identifier of the resource that was not found.   
 ** resourceType **   
 The type of the resource that was not found. 
HTTP Status Code: 400

 ** ThrottlingException **   
 The request was denied due to request throttling.     
 ** quotaCode **   
The quota code that exceeded the throttling limit.  
 ** retryAfterSeconds **   
The service code that exceeded the throttling limit. Retry your request, but if the problem persists, contact AWS support.  
 ** serviceCode **   
The service code that exceeded the throttling limit.
HTTP Status Code: 400

 ** ValidationException **   
 The input provided fails to satisfy the constraints specified by an AWS service.     
 ** fieldList **   
 The list of fields that are invalid.   
 ** reason **   
 The reason for the validation exception. 
HTTP Status Code: 400

## See Also
<a name="API_AWSBCMPricingCalculator_CreateBillEstimate_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/bcm-pricing-calculator-2024-06-19/CreateBillEstimate) 