updateViewContent method
Updates the view content of the given view identifier in the specified Connect Customer instance.
It performs content validation if Status is set to
SAVED and performs full content validation if
Status is PUBLISHED. Note that the
$SAVED alias' content will always be updated, but the
$LATEST alias' content will only be updated if
Status is PUBLISHED.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
Parameter content :
View content containing all content necessary to render a view except for
runtime input data and the runtime input schema, which is auto-generated
by this operation.
The total uncompressed content has a maximum file size of 400kB.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find the
instanceId in the ARN of the instance.
Parameter status :
Indicates the view status as either SAVED or
PUBLISHED. The PUBLISHED status will initiate
validation on the content.
Parameter viewId :
The identifier of the view. Both ViewArn and
ViewId can be used.
Implementation
Future<UpdateViewContentResponse> updateViewContent({
required ViewInputContent content,
required String instanceId,
required ViewStatus status,
required String viewId,
}) async {
final $payload = <String, dynamic>{
'Content': content,
'Status': status.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/views/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(viewId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateViewContentResponse.fromJson(response);
}