listResourcesAssociatedToCustomLineItem method
List the resources that are associated to a custom line item.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter arn :
The ARN of the custom line item for which the resource associations will
be listed.
Parameter billingPeriod :
The billing period for which the resource associations will be listed.
Parameter filters :
(Optional) A ListResourcesAssociatedToCustomLineItemFilter
that can specify the types of resources that should be retrieved.
Parameter maxResults :
(Optional) The maximum number of resource associations to be retrieved.
Parameter nextToken :
(Optional) The pagination token that's returned by a previous request.
Implementation
Future<ListResourcesAssociatedToCustomLineItemOutput>
listResourcesAssociatedToCustomLineItem({
required String arn,
String? billingPeriod,
ListResourcesAssociatedToCustomLineItemFilter? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
'Arn': arn,
if (billingPeriod != null) 'BillingPeriod': billingPeriod,
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/list-resources-associated-to-custom-line-item',
exceptionFnMap: _exceptionFns,
);
return ListResourcesAssociatedToCustomLineItemOutput.fromJson(response);
}