describeRegistrationSectionDefinitions method

Future<DescribeRegistrationSectionDefinitionsResult> describeRegistrationSectionDefinitions({
  1. required String registrationType,
  2. int? maxResults,
  3. String? nextToken,
  4. List<String>? sectionPaths,
})

Retrieves the specified registration section definitions. You can use DescribeRegistrationSectionDefinitions to view the requirements for creating, filling out, and submitting each registration type.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter registrationType : The type of registration form. The list of RegistrationTypes can be found using the DescribeRegistrationTypeDefinitions action.

Parameter maxResults : The maximum number of results to return per each request.

Parameter nextToken : The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

Parameter sectionPaths : An array of paths for the registration form section.

Implementation

Future<DescribeRegistrationSectionDefinitionsResult>
    describeRegistrationSectionDefinitions({
  required String registrationType,
  int? maxResults,
  String? nextToken,
  List<String>? sectionPaths,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target':
        'PinpointSMSVoiceV2.DescribeRegistrationSectionDefinitions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'RegistrationType': registrationType,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (sectionPaths != null) 'SectionPaths': sectionPaths,
    },
  );

  return DescribeRegistrationSectionDefinitionsResult.fromJson(
      jsonResponse.body);
}