listPolicyVersions method

Future<ListPolicyVersionsResponse> listPolicyVersions({
  1. required String policyName,
})

Lists the versions of the specified policy and identifies the default version.

May throw ResourceNotFoundException. May throw InvalidRequestException. May throw ThrottlingException. May throw UnauthorizedException. May throw ServiceUnavailableException. May throw InternalFailureException.

Parameter policyName : The policy name.

Implementation

Future<ListPolicyVersionsResponse> listPolicyVersions({
  required String policyName,
}) async {
  ArgumentError.checkNotNull(policyName, 'policyName');
  _s.validateStringLength(
    'policyName',
    policyName,
    1,
    128,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/policies/${Uri.encodeComponent(policyName)}/version',
    exceptionFnMap: _exceptionFns,
  );
  return ListPolicyVersionsResponse.fromJson(response);
}