Skip to content

create_streaming_distribution

create_streaming_distribution(
    streaming_distribution_config: StreamingDistributionConfig,
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
) -> CreateStreamingDistributionResult

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.

Parameters:

Raises:

Source code in docs_src/capo_cloudfront/_services/cloud_front.py
def create_streaming_distribution(
    self,
    streaming_distribution_config: "capo_cloudfront.types.streaming_distribution_config.StreamingDistributionConfig",
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
) -> "capo_cloudfront.types.create_streaming_distribution_result.CreateStreamingDistributionResult":
    """<p>This API is deprecated. Amazon CloudFront is deprecating real-time messaging protocol (RTMP) distributions on December 31, 2020. For more information, <a href="http://forums.aws.amazon.com/ann.jspa?annID=7356">read the announcement</a> on the Amazon CloudFront discussion forum.</p>

    Args:
        streaming_distribution_config: <p>The streaming distribution's configuration information.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.cname_already_exists.CNAMEAlreadyExists: <p>The CNAME specified is already defined for CloudFront.</p>
        capo_cloudfront.errors.inconsistent_quantities.InconsistentQuantities: <p>The value of <code>Quantity</code> and the size of <code>Items</code> don't match.</p>
        capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
        capo_cloudfront.errors.invalid_origin.InvalidOrigin: <p>The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.</p>
        capo_cloudfront.errors.invalid_origin_access_control.InvalidOriginAccessControl: <p>The origin access control is not valid.</p>
        capo_cloudfront.errors.invalid_origin_access_identity.InvalidOriginAccessIdentity: <p>The origin access identity is not valid or doesn't exist.</p>
        capo_cloudfront.errors.missing_body.MissingBody: <p>This operation requires a body. Ensure that the body is present and the <code>Content-Type</code> header is set.</p>
        capo_cloudfront.errors.streaming_distribution_already_exists.StreamingDistributionAlreadyExists: <p>The caller reference you attempted to create the streaming distribution with is associated with another distribution</p>
        capo_cloudfront.errors.too_many_streaming_distribution_cnam_es.TooManyStreamingDistributionCNAMEs: <p>Your request contains more CNAMEs than are allowed per distribution.</p>
        capo_cloudfront.errors.too_many_streaming_distributions.TooManyStreamingDistributions: <p>Processing your request would cause you to exceed the maximum number of streaming distributions allowed.</p>
        capo_cloudfront.errors.too_many_trusted_signers.TooManyTrustedSigners: <p>Your request contains more trusted signers than are allowed per distribution.</p>
        capo_cloudfront.errors.trusted_signer_does_not_exist.TrustedSignerDoesNotExist: <p>One or more of your trusted signers don't exist.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudfront.types.create_streaming_distribution_request.CreateStreamingDistributionRequest]",
    ) -> OperationResponse[
        "capo_cloudfront.types.create_streaming_distribution_result.CreateStreamingDistributionResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.create_streaming_distribution

        output, http_response = (
            capo_cloudfront._operations.cloudfront2020_05_31.create_streaming_distribution.create_streaming_distribution(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateStreamingDistribution")
    )
    input_: capo_cloudfront.types.create_streaming_distribution_request.CreateStreamingDistributionRequest = {
        "streaming_distribution_config": streaming_distribution_config
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output