aws_sdk_gameliftstreams/operation/create_application/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_application::_create_application_output::CreateApplicationOutputBuilder;
3
4pub use crate::operation::create_application::_create_application_input::CreateApplicationInputBuilder;
5
6impl crate::operation::create_application::builders::CreateApplicationInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_application::CreateApplicationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_application::CreateApplicationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_application();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateApplication`.
24///
25/// <p>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.</p>
26/// <p>Before you create an application, upload your application content files to an Amazon Simple Storage Service (Amazon S3) bucket. For more information, see <b>Getting Started</b> in the Amazon GameLift Streams Developer Guide.</p><important>
27/// <p>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.</p>
28/// </important>
29/// <p>If the request is successful, Amazon GameLift Streams begins to create an application and sets the status to <code>INITIALIZED</code>. When an application reaches <code>READY</code> status, you can use the application to set up stream groups and start streams. To track application status, call <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetApplication.html">GetApplication</a>.</p>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct CreateApplicationFluentBuilder {
32    handle: ::std::sync::Arc<crate::client::Handle>,
33    inner: crate::operation::create_application::builders::CreateApplicationInputBuilder,
34    config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37    crate::client::customize::internal::CustomizableSend<
38        crate::operation::create_application::CreateApplicationOutput,
39        crate::operation::create_application::CreateApplicationError,
40    > for CreateApplicationFluentBuilder
41{
42    fn send(
43        self,
44        config_override: crate::config::Builder,
45    ) -> crate::client::customize::internal::BoxFuture<
46        crate::client::customize::internal::SendResult<
47            crate::operation::create_application::CreateApplicationOutput,
48            crate::operation::create_application::CreateApplicationError,
49        >,
50    > {
51        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52    }
53}
54impl CreateApplicationFluentBuilder {
55    /// Creates a new `CreateApplicationFluentBuilder`.
56    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57        Self {
58            handle,
59            inner: ::std::default::Default::default(),
60            config_override: ::std::option::Option::None,
61        }
62    }
63    /// Access the CreateApplication as a reference.
64    pub fn as_input(&self) -> &crate::operation::create_application::builders::CreateApplicationInputBuilder {
65        &self.inner
66    }
67    /// Sends the request and returns the response.
68    ///
69    /// If an error occurs, an `SdkError` will be returned with additional details that
70    /// can be matched against.
71    ///
72    /// By default, any retryable failures will be retried twice. Retry behavior
73    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74    /// set when configuring the client.
75    pub async fn send(
76        self,
77    ) -> ::std::result::Result<
78        crate::operation::create_application::CreateApplicationOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::create_application::CreateApplicationError,
81            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82        >,
83    > {
84        let input = self
85            .inner
86            .build()
87            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88        let runtime_plugins = crate::operation::create_application::CreateApplication::operation_runtime_plugins(
89            self.handle.runtime_plugins.clone(),
90            &self.handle.conf,
91            self.config_override,
92        );
93        crate::operation::create_application::CreateApplication::orchestrate(&runtime_plugins, input).await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::create_application::CreateApplicationOutput,
101        crate::operation::create_application::CreateApplicationError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// <p>A human-readable label for the application. You can update this value later.</p>
116    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.inner = self.inner.description(input.into());
118        self
119    }
120    /// <p>A human-readable label for the application. You can update this value later.</p>
121    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.inner = self.inner.set_description(input);
123        self
124    }
125    /// <p>A human-readable label for the application. You can update this value later.</p>
126    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
127        self.inner.get_description()
128    }
129    /// <p>Configuration settings that identify the operating system for an application resource. This can also include a compatibility layer and other drivers.</p>
130    /// <p>A runtime environment can be one of the following:</p>
131    /// <ul>
132    /// <li>
133    /// <p>For Linux applications</p>
134    /// <ul>
135    /// <li>
136    /// <p>Ubuntu 22.04 LTS (<code>Type=UBUNTU, Version=22_04_LTS</code>)</p></li>
137    /// </ul></li>
138    /// <li>
139    /// <p>For Windows applications</p>
140    /// <ul>
141    /// <li>
142    /// <p>Microsoft Windows Server 2022 Base (<code>Type=WINDOWS, Version=2022</code>)</p></li>
143    /// <li>
144    /// <p>Proton 9.0-2 (<code>Type=PROTON, Version=20250516</code>)</p></li>
145    /// <li>
146    /// <p>Proton 8.0-5 (<code>Type=PROTON, Version=20241007</code>)</p></li>
147    /// <li>
148    /// <p>Proton 8.0-2c (<code>Type=PROTON, Version=20230704</code>)</p></li>
149    /// </ul></li>
150    /// </ul>
151    pub fn runtime_environment(mut self, input: crate::types::RuntimeEnvironment) -> Self {
152        self.inner = self.inner.runtime_environment(input);
153        self
154    }
155    /// <p>Configuration settings that identify the operating system for an application resource. This can also include a compatibility layer and other drivers.</p>
156    /// <p>A runtime environment can be one of the following:</p>
157    /// <ul>
158    /// <li>
159    /// <p>For Linux applications</p>
160    /// <ul>
161    /// <li>
162    /// <p>Ubuntu 22.04 LTS (<code>Type=UBUNTU, Version=22_04_LTS</code>)</p></li>
163    /// </ul></li>
164    /// <li>
165    /// <p>For Windows applications</p>
166    /// <ul>
167    /// <li>
168    /// <p>Microsoft Windows Server 2022 Base (<code>Type=WINDOWS, Version=2022</code>)</p></li>
169    /// <li>
170    /// <p>Proton 9.0-2 (<code>Type=PROTON, Version=20250516</code>)</p></li>
171    /// <li>
172    /// <p>Proton 8.0-5 (<code>Type=PROTON, Version=20241007</code>)</p></li>
173    /// <li>
174    /// <p>Proton 8.0-2c (<code>Type=PROTON, Version=20230704</code>)</p></li>
175    /// </ul></li>
176    /// </ul>
177    pub fn set_runtime_environment(mut self, input: ::std::option::Option<crate::types::RuntimeEnvironment>) -> Self {
178        self.inner = self.inner.set_runtime_environment(input);
179        self
180    }
181    /// <p>Configuration settings that identify the operating system for an application resource. This can also include a compatibility layer and other drivers.</p>
182    /// <p>A runtime environment can be one of the following:</p>
183    /// <ul>
184    /// <li>
185    /// <p>For Linux applications</p>
186    /// <ul>
187    /// <li>
188    /// <p>Ubuntu 22.04 LTS (<code>Type=UBUNTU, Version=22_04_LTS</code>)</p></li>
189    /// </ul></li>
190    /// <li>
191    /// <p>For Windows applications</p>
192    /// <ul>
193    /// <li>
194    /// <p>Microsoft Windows Server 2022 Base (<code>Type=WINDOWS, Version=2022</code>)</p></li>
195    /// <li>
196    /// <p>Proton 9.0-2 (<code>Type=PROTON, Version=20250516</code>)</p></li>
197    /// <li>
198    /// <p>Proton 8.0-5 (<code>Type=PROTON, Version=20241007</code>)</p></li>
199    /// <li>
200    /// <p>Proton 8.0-2c (<code>Type=PROTON, Version=20230704</code>)</p></li>
201    /// </ul></li>
202    /// </ul>
203    pub fn get_runtime_environment(&self) -> &::std::option::Option<crate::types::RuntimeEnvironment> {
204        self.inner.get_runtime_environment()
205    }
206    /// <p>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 <code>ApplicationSourceUri</code>. 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 ('<code>#!</code>').</p>
207    pub fn executable_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208        self.inner = self.inner.executable_path(input.into());
209        self
210    }
211    /// <p>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 <code>ApplicationSourceUri</code>. 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 ('<code>#!</code>').</p>
212    pub fn set_executable_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213        self.inner = self.inner.set_executable_path(input);
214        self
215    }
216    /// <p>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 <code>ApplicationSourceUri</code>. 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 ('<code>#!</code>').</p>
217    pub fn get_executable_path(&self) -> &::std::option::Option<::std::string::String> {
218        self.inner.get_executable_path()
219    }
220    /// <p>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.</p>
221    /// <p>This value is immutable. To designate a different content location, create a new application.</p><note>
222    /// <p>The Amazon S3 bucket and the Amazon GameLift Streams application must be in the same Amazon Web Services Region.</p>
223    /// </note>
224    pub fn application_source_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225        self.inner = self.inner.application_source_uri(input.into());
226        self
227    }
228    /// <p>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.</p>
229    /// <p>This value is immutable. To designate a different content location, create a new application.</p><note>
230    /// <p>The Amazon S3 bucket and the Amazon GameLift Streams application must be in the same Amazon Web Services Region.</p>
231    /// </note>
232    pub fn set_application_source_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
233        self.inner = self.inner.set_application_source_uri(input);
234        self
235    }
236    /// <p>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.</p>
237    /// <p>This value is immutable. To designate a different content location, create a new application.</p><note>
238    /// <p>The Amazon S3 bucket and the Amazon GameLift Streams application must be in the same Amazon Web Services Region.</p>
239    /// </note>
240    pub fn get_application_source_uri(&self) -> &::std::option::Option<::std::string::String> {
241        self.inner.get_application_source_uri()
242    }
243    ///
244    /// Appends an item to `ApplicationLogPaths`.
245    ///
246    /// To override the contents of this collection use [`set_application_log_paths`](Self::set_application_log_paths).
247    ///
248    /// <p>Locations of log files that your content generates during a stream session. Enter path values that are relative to the <code>ApplicationSourceUri</code> location. You can specify up to 10 log paths. Amazon GameLift Streams uploads designated log files to the Amazon S3 bucket that you specify in <code>ApplicationLogOutputUri</code> at the end of a stream session. To retrieve stored log files, call <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a> and get the <code>LogFileLocationUri</code>.</p>
249    pub fn application_log_paths(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250        self.inner = self.inner.application_log_paths(input.into());
251        self
252    }
253    /// <p>Locations of log files that your content generates during a stream session. Enter path values that are relative to the <code>ApplicationSourceUri</code> location. You can specify up to 10 log paths. Amazon GameLift Streams uploads designated log files to the Amazon S3 bucket that you specify in <code>ApplicationLogOutputUri</code> at the end of a stream session. To retrieve stored log files, call <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a> and get the <code>LogFileLocationUri</code>.</p>
254    pub fn set_application_log_paths(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
255        self.inner = self.inner.set_application_log_paths(input);
256        self
257    }
258    /// <p>Locations of log files that your content generates during a stream session. Enter path values that are relative to the <code>ApplicationSourceUri</code> location. You can specify up to 10 log paths. Amazon GameLift Streams uploads designated log files to the Amazon S3 bucket that you specify in <code>ApplicationLogOutputUri</code> at the end of a stream session. To retrieve stored log files, call <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a> and get the <code>LogFileLocationUri</code>.</p>
259    pub fn get_application_log_paths(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
260        self.inner.get_application_log_paths()
261    }
262    /// <p>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 <code>ApplicationLogPaths</code>.</p><note>
263    /// <p>The log bucket must have permissions that give Amazon GameLift Streams access to write the log files. For more information, see <a href="https://docs.aws.amazon.com/gameliftstreams/latest/developerguide/applications.html#application-bucket-permission-template">Application log bucket permission policy</a> in the <i>Amazon GameLift Streams Developer Guide</i>.</p>
264    /// </note>
265    pub fn application_log_output_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
266        self.inner = self.inner.application_log_output_uri(input.into());
267        self
268    }
269    /// <p>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 <code>ApplicationLogPaths</code>.</p><note>
270    /// <p>The log bucket must have permissions that give Amazon GameLift Streams access to write the log files. For more information, see <a href="https://docs.aws.amazon.com/gameliftstreams/latest/developerguide/applications.html#application-bucket-permission-template">Application log bucket permission policy</a> in the <i>Amazon GameLift Streams Developer Guide</i>.</p>
271    /// </note>
272    pub fn set_application_log_output_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273        self.inner = self.inner.set_application_log_output_uri(input);
274        self
275    }
276    /// <p>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 <code>ApplicationLogPaths</code>.</p><note>
277    /// <p>The log bucket must have permissions that give Amazon GameLift Streams access to write the log files. For more information, see <a href="https://docs.aws.amazon.com/gameliftstreams/latest/developerguide/applications.html#application-bucket-permission-template">Application log bucket permission policy</a> in the <i>Amazon GameLift Streams Developer Guide</i>.</p>
278    /// </note>
279    pub fn get_application_log_output_uri(&self) -> &::std::option::Option<::std::string::String> {
280        self.inner.get_application_log_output_uri()
281    }
282    ///
283    /// Adds a key-value pair to `Tags`.
284    ///
285    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
286    ///
287    /// <p>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 <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"> Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i>. You can use <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_TagResource.html">TagResource</a> to add tags, <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_UntagResource.html">UntagResource</a> to remove tags, and <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_ListTagsForResource.html">ListTagsForResource</a> to view tags on existing resources.</p>
288    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
289        self.inner = self.inner.tags(k.into(), v.into());
290        self
291    }
292    /// <p>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 <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"> Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i>. You can use <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_TagResource.html">TagResource</a> to add tags, <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_UntagResource.html">UntagResource</a> to remove tags, and <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_ListTagsForResource.html">ListTagsForResource</a> to view tags on existing resources.</p>
293    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
294        self.inner = self.inner.set_tags(input);
295        self
296    }
297    /// <p>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 <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"> Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i>. You can use <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_TagResource.html">TagResource</a> to add tags, <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_UntagResource.html">UntagResource</a> to remove tags, and <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_ListTagsForResource.html">ListTagsForResource</a> to view tags on existing resources.</p>
298    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
299        self.inner.get_tags()
300    }
301    /// <p>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.</p>
302    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
303        self.inner = self.inner.client_token(input.into());
304        self
305    }
306    /// <p>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.</p>
307    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
308        self.inner = self.inner.set_client_token(input);
309        self
310    }
311    /// <p>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.</p>
312    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
313        self.inner.get_client_token()
314    }
315}