putRetentionSettings method

Future<PutRetentionSettingsResponse> putRetentionSettings({
  1. required String accountId,
  2. required RetentionSettings retentionSettings,
})

Puts retention settings for the specified Amazon Chime Enterprise account. We recommend using AWS CloudTrail to monitor usage of this API for your account. For more information, see Logging Amazon Chime API Calls with AWS CloudTrail in the Amazon Chime Administration Guide.

To turn off existing retention settings, remove the number of days from the corresponding RetentionDays field in the RetentionSettings object. For more information about retention settings, see Managing Chat Retention Policies in the Amazon Chime Administration Guide.

May throw UnauthorizedClientException. May throw NotFoundException. May throw BadRequestException. May throw ForbiddenException. May throw ConflictException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter accountId : The Amazon Chime account ID.

Parameter retentionSettings : The retention settings.

Implementation

Future<PutRetentionSettingsResponse> putRetentionSettings({
  required String accountId,
  required RetentionSettings retentionSettings,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  ArgumentError.checkNotNull(retentionSettings, 'retentionSettings');
  final $payload = <String, dynamic>{
    'RetentionSettings': retentionSettings,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/accounts/${Uri.encodeComponent(accountId)}/retention-settings',
    exceptionFnMap: _exceptionFns,
  );
  return PutRetentionSettingsResponse.fromJson(response);
}