getDistributionLatestCacheReset method

Future<GetDistributionLatestCacheResetResult> getDistributionLatestCacheReset({
  1. String? distributionName,
})

Returns the timestamp and status of the last cache reset of a specific Amazon Lightsail content delivery network (CDN) distribution.

May throw ServiceException. May throw InvalidInputException. May throw NotFoundException. May throw OperationFailureException. May throw AccessDeniedException. May throw UnauthenticatedException.

Parameter distributionName : The name of the distribution for which to return the timestamp of the last cache reset.

Use the GetDistributions action to get a list of distribution names that you can specify.

When omitted, the response includes the latest cache reset timestamp of all your distributions.

Implementation

Future<GetDistributionLatestCacheResetResult>
    getDistributionLatestCacheReset({
  String? distributionName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Lightsail_20161128.GetDistributionLatestCacheReset'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (distributionName != null) 'distributionName': distributionName,
    },
  );

  return GetDistributionLatestCacheResetResult.fromJson(jsonResponse.body);
}