Updates the mutable configuration settings for a Amazon GameLift Streams application resource. You can change the Description, ApplicationLogOutputUri, and ApplicationLogPaths.
To update application settings, specify the application ID and provide the new values. If the operation is successful, it returns the complete updated set of settings for the application.
Parameters:
-
identifier
(Identifier)
–
An Amazon Resource Name (ARN) or ID that uniquely identifies the application resource. Example ARN: arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6. Example ID: a-9ZY8X7Wv6.
-
description
(Optional[Description], default:
None
)
–
A human-readable label for the application.
-
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 ApplicationSourceUri location, 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), $HOME or ~ (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 ApplicationLogOutputUri at the end of a stream session. To retrieve stored log files, call GetStreamSession and get the LogFileLocationUri.
-
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.
Raises:
-
AccessDeniedException
–
You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.
-
InternalServerException
–
The service encountered an internal error and is unable to complete the request.
-
ResourceNotFoundException
–
The resource specified in the request was not found. Correct the request 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/game_lift_streams.py
| def update_application(
self,
identifier: "capo_gameliftstreams.types.identifier.Identifier",
*,
config_overrides: Optional[GameLiftStreamsClientConfig] = None,
description: Optional[
"capo_gameliftstreams.types.description.Description"
] = None,
application_log_paths: Optional[
"capo_gameliftstreams.types.file_paths.FilePaths"
] = None,
application_log_output_uri: Optional[
"capo_gameliftstreams.types.application_log_output_uri.ApplicationLogOutputUri"
] = None,
) -> "capo_gameliftstreams.types.update_application_output.UpdateApplicationOutput":
"""<p> Updates the mutable configuration settings for a Amazon GameLift Streams application resource. You can change the <code>Description</code>, <code>ApplicationLogOutputUri</code>, and <code>ApplicationLogPaths</code>. </p> <p>To update application settings, specify the application ID and provide the new values. If the operation is successful, it returns the complete updated set of settings for the application.</p>
Args:
identifier: <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 application resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>. </p>
description: <p>A human-readable label for the application.</p>
application_log_paths: <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, 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.</p> <p>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: <code>.txt</code>, <code>.log</code>, and <code>.utrace</code>. To collect files with other extensions, specify the exact file path. The copy operation is not performed recursively in subfolders.</p> <p>The following path variables are recognized when they appear as the first component of a path: <code>%USERPROFILE%</code> (Windows and Proton), <code>$HOME</code> or <code>~</code> (Linux). Use a path variable when your application writes logs outside of the application directory.</p> <p>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>
application_log_output_uri: <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> <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> </note>
Raises:
capo_gameliftstreams.errors.access_denied_exception.AccessDeniedException: <p>You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.</p>
capo_gameliftstreams.errors.internal_server_exception.InternalServerException: <p>The service encountered an internal error and is unable to complete the request.</p>
capo_gameliftstreams.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request was not found. Correct the request before you try again.</p>
capo_gameliftstreams.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request after the suggested wait time.</p>
capo_gameliftstreams.errors.validation_exception.ValidationException: <p>One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.</p>
capo_gameliftstreams.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_gameliftstreams.types.update_application_input.UpdateApplicationInput]",
) -> OperationResponse[
"capo_gameliftstreams.types.update_application_output.UpdateApplicationOutput"
]:
import capo_gameliftstreams._operations.game_lift_streams.update_application
output, http_response = (
capo_gameliftstreams._operations.game_lift_streams.update_application.update_application(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateApplication")
)
input_: capo_gameliftstreams.types.update_application_input.UpdateApplicationInput = {
"identifier": identifier
}
if description is not None:
input_["description"] = description
if application_log_paths is not None:
input_["application_log_paths"] = application_log_paths
if application_log_output_uri is not None:
input_["application_log_output_uri"] = application_log_output_uri
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|