getPriceListFileUrl method

Future<GetPriceListFileUrlResponse> getPriceListFileUrl({
  1. required String fileFormat,
  2. required String priceListArn,
})

This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the Amazon Web Services Service Terms (Section 1.10).

This returns the URL that you can retrieve your Price List file from. This URL is based on the PriceListArn and FileFormat that you retrieve from the ListPriceLists response.

May throw AccessDeniedException. May throw InternalErrorException. May throw InvalidParameterException. May throw NotFoundException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter fileFormat : The format that you want to retrieve your Price List files in. The FileFormat can be obtained from the ListPriceLists response.

Parameter priceListArn : The unique identifier that maps to where your Price List files are located. PriceListArn can be obtained from the ListPriceLists response.

Implementation

Future<GetPriceListFileUrlResponse> getPriceListFileUrl({
  required String fileFormat,
  required String priceListArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSPriceListService.GetPriceListFileUrl'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FileFormat': fileFormat,
      'PriceListArn': priceListArn,
    },
  );

  return GetPriceListFileUrlResponse.fromJson(jsonResponse.body);
}