putStorageTierPolicy method

Future<PutStorageTierPolicyResponse> putStorageTierPolicy({
  1. required StorageTier storageTier,
})

Sets the storage tier policy for the account. When you set the storage tier to INTELLIGENT_TIERING, the service automatically moves log data to the most cost-effective storage tier based on access frequency.

May throw AccessDeniedException. May throw InvalidParameterException. May throw OperationAbortedException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.

Parameter storageTier : The storage tier to set for the account. Use INTELLIGENT_TIERING to automatically optimize storage costs by moving log data to the appropriate tier based on access frequency.

Implementation

Future<PutStorageTierPolicyResponse> putStorageTierPolicy({
  required StorageTier storageTier,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Logs_20140328.PutStorageTierPolicy'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'storageTier': storageTier.value,
    },
  );

  return PutStorageTierPolicyResponse.fromJson(jsonResponse.body);
}