getPolicyVersion method

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

Gets information about the specified policy version.

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

Parameter policyName : The name of the policy.

Parameter policyVersionId : The policy version ID.

Implementation

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