getPublicKey method

Future<GetPublicKeyResult> getPublicKey({
  1. required String id,
})

Gets a public key.

May throw AccessDenied. May throw NoSuchPublicKey.

Parameter id : The identifier of the public key you are getting.

Implementation

Future<GetPublicKeyResult> getPublicKey({
  required String id,
}) async {
  final $result = await _protocol.sendRaw(
    method: 'GET',
    requestUri: '/2020-05-31/public-key/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return GetPublicKeyResult(
    publicKey: PublicKey.fromXml($elem),
    eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
  );
}