create_application
async
¶
create_application(
description: Description,
runtime_environment: RuntimeEnvironment,
executable_path: ExecutablePath,
application_source_uri: ApplicationSourceUri,
*,
config_overrides: Optional[AsyncGameLiftStreamsClientConfig] = None,
application_log_paths: Optional[FilePaths] = None,
application_log_output_uri: Optional[ApplicationLogOutputUri] = None,
tags: Optional[Tags] = None,
client_token: Optional[ClientToken] = None,
) -> CreateApplicationOutput
Creates an application resource in Amazon GameLift Streams, which specifies the application content you want to stream, such as a game build or other software, and configures the settings to run it.
Before you create an application, upload your application content files to an Amazon Simple Storage Service (Amazon S3) bucket. For more information, see Getting Started in the Amazon GameLift Streams Developer Guide.
Make sure that your files in the Amazon S3 bucket are the correct version you want to use. If you change the files at a later time, you will need to create a new Amazon GameLift Streams application.
Creating an application is the only time Amazon GameLift Streams accesses your Amazon S3 bucket. After the application reaches READY status, you can delete the original files from your Amazon S3 bucket without affecting the application.
If the request is successful, Amazon GameLift Streams begins to create an application and sets the status to INITIALIZED. When an application reaches READY status, you can use the application to set up stream groups and start streams. To track application status, call GetApplication.
Parameters:
-
description(Description) –A human-readable label for the application. You can update this value later.
-
runtime_environment(RuntimeEnvironment) –Configuration settings that identify the operating system for an application resource. This can also include a compatibility layer and other drivers.
A runtime environment can be one of the following:
-
For Linux applications
-
Ubuntu 22.04 LTS (
Type=UBUNTU, Version=22_04_LTS)
-
-
For Windows applications
-
Microsoft Windows Server 2022 Base (
Type=WINDOWS, Version=2022) -
Proton 10.0-4 (
Type=PROTON, Version=20260204) -
Proton 9.0-2 (
Type=PROTON, Version=20250516) -
Proton 8.0-5 (
Type=PROTON, Version=20241007) -
Proton 8.0-2c (
Type=PROTON, Version=20230704)
-
-
-
executable_path(ExecutablePath) –The relative path and file name of the executable file that Amazon GameLift Streams will stream. Specify a path relative to the location set in
ApplicationSourceUri. The file must be contained within the application's root folder. For Windows applications, the file must be a valid Windows executable or batch file with a filename ending in .exe, .cmd, or .bat. For Linux applications, the file must be a valid Linux binary executable or a script that contains an initial interpreter line starting with a shebang ('#!'). -
application_source_uri(ApplicationSourceUri) –The location of the content that you want to stream. Enter an Amazon S3 URI to a bucket that contains your game or other application. The location can have a multi-level prefix structure, but it must include all the files needed to run the content. Amazon GameLift Streams copies everything under the specified location.
This value is immutable. To designate a different content location, create a new application.
The Amazon S3 bucket and the Amazon GameLift Streams application must be in the same Amazon Web Services Region.
-
application_log_paths(Optional[FilePaths], default:None) –Locations of log files that your content generates during a stream session. Enter path values that are relative to the
ApplicationSourceUrilocation, or relative to the user's home directory when using a supported path variable. You can specify up to 10 log paths. Each individual log file cannot exceed 50 MB in size.Each path can be a directory or an exact file path. When you specify a directory, Amazon GameLift Streams collects only files with the following extensions:
.txt,.log, and.utrace. To collect files with other extensions, specify the exact file path. The copy operation is not performed recursively in subfolders.The following path variables are recognized when they appear as the first component of a path:
%USERPROFILE%(Windows and Proton),$HOMEor~(Linux). Use a path variable when your application writes logs outside of the application directory.Amazon GameLift Streams uploads designated log files to the Amazon S3 bucket that you specify in
ApplicationLogOutputUriat the end of a stream session. To retrieve stored log files, call GetStreamSession and get theLogFileLocationUri. -
application_log_output_uri(Optional[ApplicationLogOutputUri], default:None) –An Amazon S3 URI to a bucket where you would like Amazon GameLift Streams to save application logs. Required if you specify one or more
ApplicationLogPaths.The log bucket must have permissions that give Amazon GameLift Streams access to write the log files. For more information, see Application log bucket permission policy in the Amazon GameLift Streams Developer Guide.
-
tags(Optional[Tags], default:None) –A list of labels to assign to the new application resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources is useful for resource management, access management and cost allocation. See Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. You can use TagResource to add tags, UntagResource to remove tags, and ListTagsForResource to view tags on existing resources.
-
client_token(Optional[ClientToken], default:None) –A unique identifier that represents a client request. The request is idempotent, which ensures that an API request completes only once. When users send a request, Amazon GameLift Streams automatically populates this field.
Raises:
-
AccessDeniedException–You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.
-
ConflictException–The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
-
InternalServerException–The service encountered an internal error and is unable to complete the request.
-
ServiceQuotaExceededException–The request would cause the resource to exceed an allowed service quota. Resolve the issue before you try again.
-
ThrottlingException–The request was denied due to request throttling. Retry the request after the suggested wait time.
-
ValidationException–One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_gameliftstreams/_services/async_game_lift_streams.py
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 | |