createStreamingDistribution2020_05_31 method

Future<CreateStreamingDistributionResult> createStreamingDistribution2020_05_31({
  1. required StreamingDistributionConfig streamingDistributionConfig,
})

This API is deprecated. Amazon CloudFront is deprecating real-time messaging protocol (RTMP) distributions on December 31, 2020. For more information, read the announcement on the Amazon CloudFront discussion forum.

May throw CNAMEAlreadyExists. May throw StreamingDistributionAlreadyExists. May throw InvalidOrigin. May throw InvalidOriginAccessIdentity. May throw AccessDenied. May throw TooManyTrustedSigners. May throw TrustedSignerDoesNotExist. May throw MissingBody. May throw TooManyStreamingDistributionCNAMEs. May throw TooManyStreamingDistributions. May throw InvalidArgument. May throw InconsistentQuantities.

Parameter streamingDistributionConfig : The streaming distribution's configuration information.

Implementation

Future<CreateStreamingDistributionResult>
    createStreamingDistribution2020_05_31({
  required StreamingDistributionConfig streamingDistributionConfig,
}) async {
  ArgumentError.checkNotNull(
      streamingDistributionConfig, 'streamingDistributionConfig');
  final $result = await _protocol.sendRaw(
    method: 'POST',
    requestUri: '/2020-05-31/streaming-distribution',
    payload: streamingDistributionConfig.toXml('StreamingDistributionConfig'),
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return CreateStreamingDistributionResult(
    streamingDistribution: StreamingDistribution.fromXml($elem),
    eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
    location: _s.extractHeaderStringValue($result.headers, 'Location'),
  );
}