getPolicyVersion method

Future<GetPolicyVersionResponse> getPolicyVersion({
  1. required String policyName,
  2. required String policyVersionId,
})

Gets information about the specified policy version.

Requires permission to access the GetPolicyVersion action.

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

Parameter policyName : The name of the policy.

Parameter policyVersionId : The policy version ID.

Implementation

Future<GetPolicyVersionResponse> getPolicyVersion({
  required String policyName,
  required String policyVersionId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/policies/${Uri.encodeComponent(policyName)}/version/${Uri.encodeComponent(policyVersionId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetPolicyVersionResponse.fromJson(response);
}