getTrafficPolicy method

Future<GetTrafficPolicyResponse> getTrafficPolicy({
  1. required String id,
  2. required int version,
})

Gets information about a specific traffic policy version.

For information about how of deleting a traffic policy affects the response from GetTrafficPolicy, see DeleteTrafficPolicy.

May throw NoSuchTrafficPolicy. May throw InvalidInput.

Parameter id : The ID of the traffic policy that you want to get information about.

Parameter version : The version number of the traffic policy that you want to get information about.

Implementation

Future<GetTrafficPolicyResponse> getTrafficPolicy({
  required String id,
  required int version,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  _s.validateStringLength(
    'id',
    id,
    1,
    36,
    isRequired: true,
  );
  ArgumentError.checkNotNull(version, 'version');
  _s.validateNumRange(
    'version',
    version,
    1,
    1000,
    isRequired: true,
  );
  final $result = await _protocol.send(
    method: 'GET',
    requestUri:
        '/2013-04-01/trafficpolicy/${Uri.encodeComponent(id)}/${Uri.encodeComponent(version.toString())}',
    exceptionFnMap: _exceptionFns,
  );
  return GetTrafficPolicyResponse.fromXml($result.body);
}