Smaws_Client_CostExplorer.GetCostAndUsageWithResourcesRetrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts.
Hourly granularity is only available for EC2-Instances (Elastic Compute Cloud) resource-level data. All other resource-level data is available at daily granularity.
This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information about how to access the Settings page, see Controlling Access for Cost Explorer in the Billing and Cost Management User Guide.
val error_to_string :
[ Smaws_Lib.Protocols.AwsJson.error
| `BillExpirationException of Types.bill_expiration_exception
| `BillingViewHealthStatusException of
Types.billing_view_health_status_exception
| `DataUnavailableException of Types.data_unavailable_exception
| `InvalidNextTokenException of Types.invalid_next_token_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `RequestChangedException of Types.request_changed_exception
| `ResourceNotFoundException of Types.resource_not_found_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.get_cost_and_usage_with_resources_request ->
(Types.get_cost_and_usage_with_resources_response,
[> Smaws_Lib.Protocols.AwsJson.error
| `BillExpirationException of Types.bill_expiration_exception
| `BillingViewHealthStatusException of
Types.billing_view_health_status_exception
| `DataUnavailableException of Types.data_unavailable_exception
| `InvalidNextTokenException of Types.invalid_next_token_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `RequestChangedException of Types.request_changed_exception
| `ResourceNotFoundException of Types.resource_not_found_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.get_cost_and_usage_with_resources_request ->
(Types.get_cost_and_usage_with_resources_response Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `BillExpirationException of Types.bill_expiration_exception
| `BillingViewHealthStatusException of
Types.billing_view_health_status_exception
| `DataUnavailableException of Types.data_unavailable_exception
| `InvalidNextTokenException of Types.invalid_next_token_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `RequestChangedException of Types.request_changed_exception
| `ResourceNotFoundException of Types.resource_not_found_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result