Skip to content

create_app_block_builder_streaming_url

create_app_block_builder_streaming_url(
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    app_block_builder_name: Optional[Name] = None,
    validity: Optional[Long] = None,
) -> CreateAppBlockBuilderStreamingURLResult

Creates a URL to start a create app block builder streaming session.

Parameters:

  • app_block_builder_name (Optional[Name], default: None ) –

    The name of the app block builder.

  • validity (Optional[Long], default: None ) –

    The time that the streaming URL will be valid, in seconds. Specify a value between 1 and 604800 seconds. The default is 3600 seconds.

Raises:

Source code in docs_src/capo_appstream/_services/app_stream.py
def create_app_block_builder_streaming_url(
    self,
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    app_block_builder_name: Optional["capo_appstream.types.name.Name"] = None,
    validity: Optional["capo_appstream.types.long.Long"] = None,
) -> "capo_appstream.types.create_app_block_builder_streaming_url_result.CreateAppBlockBuilderStreamingURLResult":
    """<p>Creates a URL to start a create app block builder streaming session.</p>

    Args:
        app_block_builder_name: <p>The name of the app block builder.</p>
        validity: <p>The time that the streaming URL will be valid, in seconds. Specify a value between 1 and 604800 seconds. The default is 3600 seconds.</p>

    Raises:
        capo_appstream.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
        capo_appstream.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_appstream.types.create_app_block_builder_streaming_url_request.CreateAppBlockBuilderStreamingURLRequest]",
    ) -> OperationResponse[
        "capo_appstream.types.create_app_block_builder_streaming_url_result.CreateAppBlockBuilderStreamingURLResult"
    ]:
        if req.options.protocol == "awsJson1_1":
            import capo_appstream._operations.photon_admin_proxy_service.aws_json1_1.create_app_block_builder_streaming_url

            output, http_response = (
                capo_appstream._operations.photon_admin_proxy_service.aws_json1_1.create_app_block_builder_streaming_url.create_app_block_builder_streaming_url(
                    req.options, req.input
                )
            )
        elif req.options.protocol == "rpcv2Cbor":
            import capo_appstream._operations.photon_admin_proxy_service.rpcv2_cbor.create_app_block_builder_streaming_url

            output, http_response = (
                capo_appstream._operations.photon_admin_proxy_service.rpcv2_cbor.create_app_block_builder_streaming_url.create_app_block_builder_streaming_url(
                    req.options, req.input
                )
            )
        else:
            raise ValueError(f"unknown protocol {req.options.protocol!r}")
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_appstream.types.create_app_block_builder_streaming_url_result.CreateAppBlockBuilderStreamingURLResult",
    ) -> dict[str, Any]:
        import capo_appstream.types.create_app_block_builder_streaming_url_result

        return capo_appstream.types.create_app_block_builder_streaming_url_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateAppBlockBuilderStreamingURL", redact_output=_redact_output
        ),
    )
    input_: capo_appstream.types.create_app_block_builder_streaming_url_request.CreateAppBlockBuilderStreamingURLRequest = {}
    if app_block_builder_name is not None:
        input_["app_block_builder_name"] = app_block_builder_name
    if validity is not None:
        input_["validity"] = validity

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