describeTrafficSources method
Gets information about the traffic sources for the specified Auto Scaling group.
You can optionally provide a traffic source type. If you provide a traffic source type, then the results only include that traffic source type.
If you do not provide a traffic source type, then the results include all the traffic sources for the specified Auto Scaling group.
May throw InvalidNextToken.
May throw ResourceContentionFault.
Parameter autoScalingGroupName :
The name of the Auto Scaling group.
Parameter maxRecords :
The maximum number of items to return with this call. The maximum value is
50.
Parameter nextToken :
The token for the next set of items to return. (You received this token
from a previous call.)
Parameter trafficSourceType :
The traffic source type that you want to describe.
The following lists the valid values:
-
elbif the traffic source is a Classic Load Balancer. -
elbv2if the traffic source is a Application Load Balancer, Gateway Load Balancer, or Network Load Balancer. -
vpc-latticeif the traffic source is VPC Lattice.
Implementation
Future<DescribeTrafficSourcesResponse> describeTrafficSources({
required String autoScalingGroupName,
int? maxRecords,
String? nextToken,
String? trafficSourceType,
}) async {
final $request = <String, String>{
'AutoScalingGroupName': autoScalingGroupName,
if (maxRecords != null) 'MaxRecords': maxRecords.toString(),
if (nextToken != null) 'NextToken': nextToken,
if (trafficSourceType != null) 'TrafficSourceType': trafficSourceType,
};
final $result = await _protocol.send(
$request,
action: 'DescribeTrafficSources',
version: '2011-01-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DescribeTrafficSourcesResult',
);
return DescribeTrafficSourcesResponse.fromXml($result);
}