describeRetentionConfigurations method

Future<DescribeRetentionConfigurationsResponse> describeRetentionConfigurations({
  1. String? nextToken,
  2. List<String>? retentionConfigurationNames,
})

Returns the details of one or more retention configurations. If the retention configuration name is not specified, this action returns the details for all the retention configurations for that account.

May throw InvalidParameterValueException. May throw NoSuchRetentionConfigurationException. May throw InvalidNextTokenException.

Parameter nextToken : The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Parameter retentionConfigurationNames : A list of names of retention configurations for which you want details. If you do not specify a name, AWS Config returns details for all the retention configurations for that account.

Implementation

Future<DescribeRetentionConfigurationsResponse>
    describeRetentionConfigurations({
  String? nextToken,
  List<String>? retentionConfigurationNames,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.DescribeRetentionConfigurations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (nextToken != null) 'NextToken': nextToken,
      if (retentionConfigurationNames != null)
        'RetentionConfigurationNames': retentionConfigurationNames,
    },
  );

  return DescribeRetentionConfigurationsResponse.fromJson(jsonResponse.body);
}