listTagsForResource method
Lists the tags for an Amazon Forecast resource.
May throw ResourceNotFoundException. May throw InvalidInputException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) that identifies the resource for which to
list the tags. Currently, the supported resources are Forecast dataset
groups, datasets, dataset import jobs, predictors, forecasts, and forecast
export jobs.
Implementation
Future<ListTagsForResourceResponse> listTagsForResource({
required String resourceArn,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
_s.validateStringLength(
'resourceArn',
resourceArn,
0,
256,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonForecast.ListTagsForResource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
},
);
return ListTagsForResourceResponse.fromJson(jsonResponse.body);
}