importPlaybackKeyPair method

Future<ImportPlaybackKeyPairResponse> importPlaybackKeyPair({
  1. required String publicKeyMaterial,
  2. String? name,
  3. Map<String, String>? tags,
})

Imports the public portion of a new key pair and returns its arn and fingerprint. The privateKey can then be used to generate viewer authorization tokens, to grant viewers access to private channels. For more information, see Setting Up Private Channels in the Amazon IVS User Guide.

May throw AccessDeniedException. May throw ConflictException. May throw PendingVerification. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter publicKeyMaterial : The public portion of a customer-generated key pair.

Parameter name : Playback-key-pair name. The value does not need to be unique.

Parameter tags : Any tags provided with the request are added to the playback key pair tags. See Best practices and strategies in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there.

Implementation

Future<ImportPlaybackKeyPairResponse> importPlaybackKeyPair({
  required String publicKeyMaterial,
  String? name,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'publicKeyMaterial': publicKeyMaterial,
    if (name != null) 'name': name,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ImportPlaybackKeyPair',
    exceptionFnMap: _exceptionFns,
  );
  return ImportPlaybackKeyPairResponse.fromJson(response);
}