Skip to content

create_streaming_url

create_streaming_url(
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    stack_name: Optional[String] = None,
    fleet_name: Optional[String] = None,
    user_id: Optional[StreamingUrlUserId] = None,
    application_id: Optional[String] = None,
    validity: Optional[Long] = None,
    session_context: Optional[String] = None,
) -> CreateStreamingURLResult

Creates a temporary URL to start an WorkSpaces Applications streaming session for the specified user. A streaming URL enables application streaming to be tested without user setup.

Parameters:

  • stack_name (Optional[String], default: None ) –

    The name of the stack.

  • fleet_name (Optional[String], default: None ) –

    The name of the fleet.

  • user_id (Optional[StreamingUrlUserId], default: None ) –

    The identifier of the user.

  • application_id (Optional[String], default: None ) –

    The name of the application to launch after the session starts. This is the name that you specified as Name in the Image Assistant. If your fleet is enabled for the Desktop stream view, you can also choose to launch directly to the operating system desktop. To do so, specify Desktop.

  • 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 60 seconds.

  • session_context (Optional[String], default: None ) –

    The session context. For more information, see Session Context in the Amazon WorkSpaces Applications Administration Guide.

Raises:

Source code in docs_src/capo_appstream/_services/app_stream.py
def create_streaming_url(
    self,
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    stack_name: Optional["capo_appstream.types.string.String"] = None,
    fleet_name: Optional["capo_appstream.types.string.String"] = None,
    user_id: Optional[
        "capo_appstream.types.streaming_url_user_id.StreamingUrlUserId"
    ] = None,
    application_id: Optional["capo_appstream.types.string.String"] = None,
    validity: Optional["capo_appstream.types.long.Long"] = None,
    session_context: Optional["capo_appstream.types.string.String"] = None,
) -> "capo_appstream.types.create_streaming_url_result.CreateStreamingURLResult":
    """<p>Creates a temporary URL to start an WorkSpaces Applications streaming session for the specified user. A streaming URL enables application streaming to be tested without user setup. </p>

    Args:
        stack_name: <p>The name of the stack.</p>
        fleet_name: <p>The name of the fleet.</p>
        user_id: <p>The identifier of the user.</p>
        application_id: <p>The name of the application to launch after the session starts. This is the name that you specified as <b>Name</b> in the Image Assistant. If your fleet is enabled for the <b>Desktop</b> stream view, you can also choose to launch directly to the operating system desktop. To do so, specify <b>Desktop</b>.</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 60 seconds.</p>
        session_context: <p>The session context. For more information, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/managing-stacks-fleets.html#managing-stacks-fleets-parameters">Session Context</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>

    Raises:
        capo_appstream.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Indicates an incorrect combination of parameters, or a missing parameter.</p>
        capo_appstream.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
        capo_appstream.errors.resource_not_available_exception.ResourceNotAvailableException: <p>The specified resource exists and is not in use, but isn't available.</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_streaming_url_request.CreateStreamingURLRequest]",
    ) -> OperationResponse[
        "capo_appstream.types.create_streaming_url_result.CreateStreamingURLResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.create_streaming_url

        output, http_response = (
            capo_appstream._operations.photon_admin_proxy_service.create_streaming_url.create_streaming_url(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateStreamingURL")
    )
    input_: capo_appstream.types.create_streaming_url_request.CreateStreamingURLRequest = {}
    if stack_name is not None:
        input_["stack_name"] = stack_name
    if fleet_name is not None:
        input_["fleet_name"] = fleet_name
    if user_id is not None:
        input_["user_id"] = user_id
    if application_id is not None:
        input_["application_id"] = application_id
    if validity is not None:
        input_["validity"] = validity
    if session_context is not None:
        input_["session_context"] = session_context

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