createPublicKey2018_11_05 method
Future<CreatePublicKeyResult>
createPublicKey2018_11_05({
- required PublicKeyConfig publicKeyConfig,
Add a new public key to CloudFront to use, for example, for field-level encryption. You can add a maximum of 10 public keys with one AWS account.
May throw PublicKeyAlreadyExists. May throw InvalidArgument. May throw TooManyPublicKeys.
Parameter publicKeyConfig
:
The request to add a public key to CloudFront.
Implementation
Future<CreatePublicKeyResult> createPublicKey2018_11_05({
required PublicKeyConfig publicKeyConfig,
}) async {
ArgumentError.checkNotNull(publicKeyConfig, 'publicKeyConfig');
final $result = await _protocol.sendRaw(
method: 'POST',
requestUri: '/2018-11-05/public-key',
payload: publicKeyConfig.toXml('PublicKeyConfig'),
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return CreatePublicKeyResult(
publicKey: PublicKey.fromXml($elem),
eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
location: _s.extractHeaderStringValue($result.headers, 'Location'),
);
}