createPublicKey2019_03_26 method
Future<CreatePublicKeyResult>
createPublicKey2019_03_26({
- 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> createPublicKey2019_03_26({
required PublicKeyConfig publicKeyConfig,
}) async {
ArgumentError.checkNotNull(publicKeyConfig, 'publicKeyConfig');
final $result = await _protocol.sendRaw(
method: 'POST',
requestUri: '/2019-03-26/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'),
);
}