getPackageVersion method

Future<GetPackageVersionResponse> getPackageVersion({
  1. required String packageName,
  2. required String versionName,
})

Gets information about the specified package version.

Requires permission to access the GetPackageVersion action.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter packageName : The name of the associated package.

Parameter versionName : The name of the target package version.

Implementation

Future<GetPackageVersionResponse> getPackageVersion({
  required String packageName,
  required String versionName,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/packages/${Uri.encodeComponent(packageName)}/versions/${Uri.encodeComponent(versionName)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetPackageVersionResponse.fromJson(response);
}