Skip to content

create_application

create_application(
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    name: Optional[Name] = None,
    display_name: Optional[DisplayName] = None,
    description: Optional[Description] = None,
    icon_s3_location: Optional[S3Location] = None,
    launch_path: Optional[String] = None,
    working_directory: Optional[String] = None,
    launch_parameters: Optional[String] = None,
    platforms: Optional[Platforms] = None,
    instance_families: Optional[StringList] = None,
    app_block_arn: Optional[Arn] = None,
    tags: Optional[Tags] = None,
) -> CreateApplicationResult

Creates an application.

Applications are a WorkSpaces Applications resource that stores the details about how to launch applications on Elastic fleet streaming instances. An application consists of the launch details, icon, and display name. Applications are associated with an app block that contains the application binaries and other files. The applications assigned to an Elastic fleet are the applications users can launch.

This is only supported for Elastic fleets.

Parameters:

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

    The name of the application. This name is visible to users when display name is not specified.

  • display_name (Optional[DisplayName], default: None ) –

    The display name of the application. This name is visible to users in the application catalog.

  • description (Optional[Description], default: None ) –

    The description of the application.

  • icon_s3_location (Optional[S3Location], default: None ) –

    The location in S3 of the application icon.

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

    The launch path of the application.

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

    The working directory of the application.

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

    The launch parameters of the application.

  • platforms (Optional[Platforms], default: None ) –

    The platforms the application supports. WINDOWS_SERVER_2019, AMAZON_LINUX2 and UBUNTU_PRO_2404 are supported for Elastic fleets.

  • instance_families (Optional[StringList], default: None ) –

    The instance families the application supports. Valid values are GENERAL_PURPOSE and GRAPHICS_G4.

  • app_block_arn (Optional[Arn], default: None ) –

    The app block ARN to which the application should be associated

  • tags (Optional[Tags], default: None ) –

    The tags assigned to the application.

Raises:

Source code in docs_src/capo_appstream/_services/app_stream.py
def create_application(
    self,
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    name: Optional["capo_appstream.types.name.Name"] = None,
    display_name: Optional["capo_appstream.types.display_name.DisplayName"] = None,
    description: Optional["capo_appstream.types.description.Description"] = None,
    icon_s3_location: Optional[
        "capo_appstream.types.s3_location.S3Location"
    ] = None,
    launch_path: Optional["capo_appstream.types.string.String"] = None,
    working_directory: Optional["capo_appstream.types.string.String"] = None,
    launch_parameters: Optional["capo_appstream.types.string.String"] = None,
    platforms: Optional["capo_appstream.types.platforms.Platforms"] = None,
    instance_families: Optional[
        "capo_appstream.types.string_list.StringList"
    ] = None,
    app_block_arn: Optional["capo_appstream.types.arn.Arn"] = None,
    tags: Optional["capo_appstream.types.tags.Tags"] = None,
) -> "capo_appstream.types.create_application_result.CreateApplicationResult":
    """<p>Creates an application.</p> <p>Applications are a WorkSpaces Applications resource that stores the details about how to launch applications on Elastic fleet streaming instances. An application consists of the launch details, icon, and display name. Applications are associated with an app block that contains the application binaries and other files. The applications assigned to an Elastic fleet are the applications users can launch. </p> <p>This is only supported for Elastic fleets.</p>

    Args:
        name: <p>The name of the application. This name is visible to users when display name is not specified.</p>
        display_name: <p>The display name of the application. This name is visible to users in the application catalog.</p>
        description: <p>The description of the application.</p>
        icon_s3_location: <p>The location in S3 of the application icon.</p>
        launch_path: <p>The launch path of the application.</p>
        working_directory: <p>The working directory of the application.</p>
        launch_parameters: <p>The launch parameters of the application.</p>
        platforms: <p>The platforms the application supports. WINDOWS_SERVER_2019, AMAZON_LINUX2 and UBUNTU_PRO_2404 are supported for Elastic fleets.</p>
        instance_families: <p>The instance families the application supports. Valid values are GENERAL_PURPOSE and GRAPHICS_G4.</p>
        app_block_arn: <p>The app block ARN to which the application should be associated</p>
        tags: <p>The tags assigned to the application.</p>

    Raises:
        capo_appstream.errors.concurrent_modification_exception.ConcurrentModificationException: <p>An API error occurred. Wait a few minutes and try again.</p>
        capo_appstream.errors.limit_exceeded_exception.LimitExceededException: <p>The requested limit exceeds the permitted limit for an account.</p>
        capo_appstream.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
        capo_appstream.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The specified resource already exists.</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_application_request.CreateApplicationRequest]",
    ) -> OperationResponse[
        "capo_appstream.types.create_application_result.CreateApplicationResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.create_application

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateApplication")
    )
    input_: capo_appstream.types.create_application_request.CreateApplicationRequest = {}
    if name is not None:
        input_["name"] = name
    if display_name is not None:
        input_["display_name"] = display_name
    if description is not None:
        input_["description"] = description
    if icon_s3_location is not None:
        input_["icon_s3_location"] = icon_s3_location
    if launch_path is not None:
        input_["launch_path"] = launch_path
    if working_directory is not None:
        input_["working_directory"] = working_directory
    if launch_parameters is not None:
        input_["launch_parameters"] = launch_parameters
    if platforms is not None:
        input_["platforms"] = platforms
    if instance_families is not None:
        input_["instance_families"] = instance_families
    if app_block_arn is not None:
        input_["app_block_arn"] = app_block_arn
    if tags is not None:
        input_["tags"] = tags

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