putAppInstanceRetentionSettings method
Future<PutAppInstanceRetentionSettingsResponse>
putAppInstanceRetentionSettings({
- required String appInstanceArn,
- required AppInstanceRetentionSettings appInstanceRetentionSettings,
Sets the amount of time in days that a given app instance retains data.
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 appInstanceArn
:
The ARN of the app instance.
Parameter appInstanceRetentionSettings
:
The time in days to retain data. Data type: number.
Implementation
Future<PutAppInstanceRetentionSettingsResponse>
putAppInstanceRetentionSettings({
required String appInstanceArn,
required AppInstanceRetentionSettings appInstanceRetentionSettings,
}) async {
ArgumentError.checkNotNull(appInstanceArn, 'appInstanceArn');
_s.validateStringLength(
'appInstanceArn',
appInstanceArn,
5,
1600,
isRequired: true,
);
ArgumentError.checkNotNull(
appInstanceRetentionSettings, 'appInstanceRetentionSettings');
final $payload = <String, dynamic>{
'AppInstanceRetentionSettings': appInstanceRetentionSettings,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/app-instances/${Uri.encodeComponent(appInstanceArn)}/retention-settings',
exceptionFnMap: _exceptionFns,
);
return PutAppInstanceRetentionSettingsResponse.fromJson(response);
}