The C# SDK does not handle Paginated Report definitions correctly. Even an empty sheet causes validation errors.
When the analysis contains a Paginated Report sheet, the validation complains about null values:
Unhandled exception. Amazon.QuickSight.AmazonQuickSightException: 3 validation errors detected: Value null at 'definition.sheets.1.member.layouts.1.member.configuration.sectionBasedLayout.headerSections.1.member.layout.freeFormLayout.elements' failed to satisfy constraint: M
ember must not be null; Value null at 'definition.sheets.1.member.layouts.1.member.configuration.sectionBasedLayout.footerSections.1.member.layout.freeFormLayout.elements' failed to satisfy constraint: Member must not be null; Value null at 'definition.sheets.1.member.layout
s.1.member.configuration.sectionBasedLayout.bodySections.1.member.content.layout.freeFormLayout.elements' failed to satisfy constraint: Member must not be null
Below is a sample C# Code that demonstrates the issue:
var awsAccountId = "123";
var sourceAnalysisId = "345";
var newAnalysisId = Guid.NewGuid().ToString();
var quickSight = new AmazonQuickSightClient(RegionEndpoint.GetBySystemName("eu-west-1"));
var describeDefinitionResponse = await quickSight.DescribeAnalysisDefinitionAsync(
new DescribeAnalysisDefinitionRequest
{
AwsAccountId = awsAccountId,
AnalysisId = sourceAnalysisId
});
// This will throw a validation exception
var createAnalysisResponse = await quickSight.CreateAnalysisAsync(
new CreateAnalysisRequest
{
AwsAccountId = awsAccountId,
AnalysisId = newAnalysisId,
Name = "A copy",
Definition = describeDefinitionResponse.Definition
});
I could not create a sample analysis in Arena as that does not support paginated reports, but any blank paginated report will already cause these validation errors.
The more complex the report the more validation errors.