describeProtectConfigurations method

Future<DescribeProtectConfigurationsResult> describeProtectConfigurations({
  1. List<ProtectConfigurationFilter>? filters,
  2. int? maxResults,
  3. String? nextToken,
  4. List<String>? protectConfigurationIds,
})

Retrieves the protect configurations that match any of filters. If a filter isn’t provided then all protect configurations are returned.

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

Parameter filters : An array of ProtectConfigurationFilter objects to filter the results.

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 protectConfigurationIds : An array of protect configuration identifiers to search for.

Implementation

Future<DescribeProtectConfigurationsResult> describeProtectConfigurations({
  List<ProtectConfigurationFilter>? filters,
  int? maxResults,
  String? nextToken,
  List<String>? protectConfigurationIds,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PinpointSMSVoiceV2.DescribeProtectConfigurations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'Filters': filters,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (protectConfigurationIds != null)
        'ProtectConfigurationIds': protectConfigurationIds,
    },
  );

  return DescribeProtectConfigurationsResult.fromJson(jsonResponse.body);
}