Skip to content

update_streaming_distribution async

update_streaming_distribution(
    streaming_distribution_config: StreamingDistributionConfig,
    id: string,
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    if_match: Optional[string] = None,
) -> UpdateStreamingDistributionResult

Update a streaming distribution.

Parameters:

  • streaming_distribution_config (StreamingDistributionConfig) –

    The streaming distribution's configuration information.

  • id (string) –

    The streaming distribution's id.

  • if_match (Optional[string], default: None ) –

    The value of the ETag header that you received when retrieving the streaming distribution's configuration. For example: E2QWRUHAPOMQZL.

Raises:

Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
async def update_streaming_distribution(
    self,
    streaming_distribution_config: "capo_cloudfront.types.streaming_distribution_config.StreamingDistributionConfig",
    id: "capo_cloudfront.types.string.string",
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    if_match: Optional["capo_cloudfront.types.string.string"] = None,
) -> "capo_cloudfront.types.update_streaming_distribution_result.UpdateStreamingDistributionResult":
    """<p>Update a streaming distribution.</p>

    Args:
        streaming_distribution_config: <p>The streaming distribution's configuration information.</p>
        id: <p>The streaming distribution's id.</p>
        if_match: <p>The value of the <code>ETag</code> header that you received when retrieving the streaming distribution's configuration. For example: <code>E2QWRUHAPOMQZL</code>.</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.illegal_update.IllegalUpdate: <p>The update contains modifications that are not allowed.</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_if_match_version.InvalidIfMatchVersion: <p>The <code>If-Match</code> version is missing or not valid.</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.no_such_streaming_distribution.NoSuchStreamingDistribution: <p>The specified streaming distribution does not exist.</p>
        capo_cloudfront.errors.precondition_failed.PreconditionFailed: <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</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_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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudfront.types.update_streaming_distribution_request.UpdateStreamingDistributionRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudfront.types.update_streaming_distribution_result.UpdateStreamingDistributionResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.update_streaming_distribution

        (
            output,
            http_response,
        ) = await capo_cloudfront._operations.cloudfront2020_05_31.update_streaming_distribution.async_update_streaming_distribution(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateStreamingDistribution")
    )
    input_: capo_cloudfront.types.update_streaming_distribution_request.UpdateStreamingDistributionRequest = {
        "streaming_distribution_config": streaming_distribution_config,
        "id": id,
    }
    if if_match is not None:
        input_["if_match"] = if_match

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output