describeTrafficSources method

Future<DescribeTrafficSourcesResponse> describeTrafficSources({
  1. required String autoScalingGroupName,
  2. int? maxRecords,
  3. String? nextToken,
  4. String? trafficSourceType,
})

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:

  • elb if the traffic source is a Classic Load Balancer.
  • elbv2 if the traffic source is a Application Load Balancer, Gateway Load Balancer, or Network Load Balancer.
  • vpc-lattice if 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);
}