aws_sdk_gameliftstreams/operation/export_stream_session_files/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::export_stream_session_files::_export_stream_session_files_output::ExportStreamSessionFilesOutputBuilder;
3
4pub use crate::operation::export_stream_session_files::_export_stream_session_files_input::ExportStreamSessionFilesInputBuilder;
5
6impl crate::operation::export_stream_session_files::builders::ExportStreamSessionFilesInputBuilder {
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::export_stream_session_files::ExportStreamSessionFilesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::export_stream_session_files::ExportStreamSessionFilesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.export_stream_session_files();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ExportStreamSessionFiles`.
24///
25/// <p>Export the files that your application modifies or generates in a stream session, which can help you debug or verify your application. When your application runs, it generates output files such as logs, diagnostic information, crash dumps, save files, user data, screenshots, and so on. The files can be defined by the engine or frameworks that your application uses, or information that you've programmed your application to output.</p>
26/// <p>You can only call this action on a stream session that is in progress, specifically in one of the following statuses <code>ACTIVE</code>, <code>CONNECTED</code>, <code>PENDING_CLIENT_RECONNECTION</code>, and <code>RECONNECTING</code>. You must provide an Amazon Simple Storage Service (Amazon S3) bucket to store the files in. When the session ends, Amazon GameLift Streams produces a compressed folder that contains all of the files and directories that were modified or created by the application during the stream session. AWS uses your security credentials to authenticate and authorize access to your Amazon S3 bucket.</p>
27/// <p>Amazon GameLift Streams collects the following generated and modified files. Find them in the corresponding folders in the <code>.zip</code> archive.</p>
28/// <ul>
29/// <li>
30/// <p><code>application/</code>: The folder where your application or game is stored.</p></li>
31/// </ul>
32/// <ul>
33/// <li>
34/// <p><code>profile/</code>: The user profile folder.</p></li>
35/// <li>
36/// <p><code>temp/</code>: The system temp folder.</p></li>
37/// </ul>
38/// <p></p>
39/// <p>To verify the status of the exported files, use GetStreamSession.</p>
40/// <p>To delete the files, delete the object in the S3 bucket.</p>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct ExportStreamSessionFilesFluentBuilder {
43 handle: ::std::sync::Arc<crate::client::Handle>,
44 inner: crate::operation::export_stream_session_files::builders::ExportStreamSessionFilesInputBuilder,
45 config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48 crate::client::customize::internal::CustomizableSend<
49 crate::operation::export_stream_session_files::ExportStreamSessionFilesOutput,
50 crate::operation::export_stream_session_files::ExportStreamSessionFilesError,
51 > for ExportStreamSessionFilesFluentBuilder
52{
53 fn send(
54 self,
55 config_override: crate::config::Builder,
56 ) -> crate::client::customize::internal::BoxFuture<
57 crate::client::customize::internal::SendResult<
58 crate::operation::export_stream_session_files::ExportStreamSessionFilesOutput,
59 crate::operation::export_stream_session_files::ExportStreamSessionFilesError,
60 >,
61 > {
62 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63 }
64}
65impl ExportStreamSessionFilesFluentBuilder {
66 /// Creates a new `ExportStreamSessionFilesFluentBuilder`.
67 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
68 Self {
69 handle,
70 inner: ::std::default::Default::default(),
71 config_override: ::std::option::Option::None,
72 }
73 }
74 /// Access the ExportStreamSessionFiles as a reference.
75 pub fn as_input(&self) -> &crate::operation::export_stream_session_files::builders::ExportStreamSessionFilesInputBuilder {
76 &self.inner
77 }
78 /// Sends the request and returns the response.
79 ///
80 /// If an error occurs, an `SdkError` will be returned with additional details that
81 /// can be matched against.
82 ///
83 /// By default, any retryable failures will be retried twice. Retry behavior
84 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
85 /// set when configuring the client.
86 pub async fn send(
87 self,
88 ) -> ::std::result::Result<
89 crate::operation::export_stream_session_files::ExportStreamSessionFilesOutput,
90 ::aws_smithy_runtime_api::client::result::SdkError<
91 crate::operation::export_stream_session_files::ExportStreamSessionFilesError,
92 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
93 >,
94 > {
95 let input = self
96 .inner
97 .build()
98 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
99 let runtime_plugins = crate::operation::export_stream_session_files::ExportStreamSessionFiles::operation_runtime_plugins(
100 self.handle.runtime_plugins.clone(),
101 &self.handle.conf,
102 self.config_override,
103 );
104 crate::operation::export_stream_session_files::ExportStreamSessionFiles::orchestrate(&runtime_plugins, input).await
105 }
106
107 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
108 pub fn customize(
109 self,
110 ) -> crate::client::customize::CustomizableOperation<
111 crate::operation::export_stream_session_files::ExportStreamSessionFilesOutput,
112 crate::operation::export_stream_session_files::ExportStreamSessionFilesError,
113 Self,
114 > {
115 crate::client::customize::CustomizableOperation::new(self)
116 }
117 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
118 self.set_config_override(::std::option::Option::Some(config_override.into()));
119 self
120 }
121
122 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
123 self.config_override = config_override;
124 self
125 }
126 /// <p>An <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>.</p>
127 pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.inner = self.inner.identifier(input.into());
129 self
130 }
131 /// <p>An <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>.</p>
132 pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.inner = self.inner.set_identifier(input);
134 self
135 }
136 /// <p>An <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>.</p>
137 pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
138 self.inner.get_identifier()
139 }
140 /// <p>An <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream session resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamsession/sg-1AB2C3De4/ABC123def4567</code>. Example ID: <code>ABC123def4567</code>.</p>
141 pub fn stream_session_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.inner = self.inner.stream_session_identifier(input.into());
143 self
144 }
145 /// <p>An <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream session resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamsession/sg-1AB2C3De4/ABC123def4567</code>. Example ID: <code>ABC123def4567</code>.</p>
146 pub fn set_stream_session_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.inner = self.inner.set_stream_session_identifier(input);
148 self
149 }
150 /// <p>An <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream session resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamsession/sg-1AB2C3De4/ABC123def4567</code>. Example ID: <code>ABC123def4567</code>.</p>
151 pub fn get_stream_session_identifier(&self) -> &::std::option::Option<::std::string::String> {
152 self.inner.get_stream_session_identifier()
153 }
154 /// <p>The S3 bucket URI where Amazon GameLift Streams uploads the set of compressed exported files for this stream session. Amazon GameLift Streams generates a ZIP file name based on the stream session metadata. Alternatively, you can provide a custom file name with a <code>.zip</code> file extension.</p>
155 /// <p>Example 1: If you provide an S3 URI called <code>s3://amzn-s3-demo-destination-bucket/MyGame_Session1.zip</code>, then Amazon GameLift Streams will save the files at that location.</p>
156 /// <p>Example 2: If you provide an S3 URI called <code>s3://amzn-s3-demo-destination-bucket/MyGameSessions_ExportedFiles/</code>, then Amazon GameLift Streams will save the files at <code>s3://amzn-s3-demo-destination-bucket/MyGameSessions_ExportedFiles/YYYYMMDD-HHMMSS-appId-sg-Id-sessionId.zip</code> or another similar name.</p>
157 pub fn output_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.inner = self.inner.output_uri(input.into());
159 self
160 }
161 /// <p>The S3 bucket URI where Amazon GameLift Streams uploads the set of compressed exported files for this stream session. Amazon GameLift Streams generates a ZIP file name based on the stream session metadata. Alternatively, you can provide a custom file name with a <code>.zip</code> file extension.</p>
162 /// <p>Example 1: If you provide an S3 URI called <code>s3://amzn-s3-demo-destination-bucket/MyGame_Session1.zip</code>, then Amazon GameLift Streams will save the files at that location.</p>
163 /// <p>Example 2: If you provide an S3 URI called <code>s3://amzn-s3-demo-destination-bucket/MyGameSessions_ExportedFiles/</code>, then Amazon GameLift Streams will save the files at <code>s3://amzn-s3-demo-destination-bucket/MyGameSessions_ExportedFiles/YYYYMMDD-HHMMSS-appId-sg-Id-sessionId.zip</code> or another similar name.</p>
164 pub fn set_output_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.inner = self.inner.set_output_uri(input);
166 self
167 }
168 /// <p>The S3 bucket URI where Amazon GameLift Streams uploads the set of compressed exported files for this stream session. Amazon GameLift Streams generates a ZIP file name based on the stream session metadata. Alternatively, you can provide a custom file name with a <code>.zip</code> file extension.</p>
169 /// <p>Example 1: If you provide an S3 URI called <code>s3://amzn-s3-demo-destination-bucket/MyGame_Session1.zip</code>, then Amazon GameLift Streams will save the files at that location.</p>
170 /// <p>Example 2: If you provide an S3 URI called <code>s3://amzn-s3-demo-destination-bucket/MyGameSessions_ExportedFiles/</code>, then Amazon GameLift Streams will save the files at <code>s3://amzn-s3-demo-destination-bucket/MyGameSessions_ExportedFiles/YYYYMMDD-HHMMSS-appId-sg-Id-sessionId.zip</code> or another similar name.</p>
171 pub fn get_output_uri(&self) -> &::std::option::Option<::std::string::String> {
172 self.inner.get_output_uri()
173 }
174}