get_cost_estimate
async
¶
get_cost_estimate(
resource_name: ResourceName,
start_time: IsoDate,
end_time: IsoDate,
*,
config_overrides: Optional[AsyncLightsailClientConfig] = None,
) -> GetCostEstimateResult
Retrieves information about the cost estimate for a specified resource. A cost estimate will not generate for a resource that has been deleted.
Parameters:
-
resource_name(ResourceName) –The resource name.
-
start_time(IsoDate) –The cost estimate start time.
Constraints:
-
Specified in Coordinated Universal Time (UTC).
-
Specified in the Unix time format.
For example, if you want to use a start time of October 1, 2018, at 8 PM UTC, specify
1538424000as the start time.
You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
-
-
end_time(IsoDate) –The cost estimate end time.
Constraints:
-
Specified in Coordinated Universal Time (UTC).
-
Specified in the Unix time format.
For example, if you want to use an end time of October 1, 2018, at 9 PM UTC, specify
1538427600as the end time.
You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
-
Raises:
-
AccessDeniedException–Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.
-
InvalidInputException–Lightsail throws this exception when user input does not conform to the validation rules of an input field.
Domain and distribution APIs are only available in the N. Virginia (
us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration tous-east-1to create, view, or edit these resources. -
NotFoundException–Lightsail throws this exception when it cannot find a resource.
-
RegionSetupInProgressException–Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.
-
ServiceException–A general service exception.
-
UnauthenticatedException–Lightsail throws this exception when the user has not been authenticated.
-
UnknownServiceError–The service returned an error code this client does not model.