This API works with the following fleet types: EC2
Updates metadata in a build resource, including the build name and version. To update the metadata, specify the build ID to update and provide the new values. If successful, a build object containing the updated metadata is returned.
Learn more
Upload a Custom Server Build
All APIs by task
Parameters:
-
build_id
(Optional[BuildIdOrArn], default:
None
)
–
A unique identifier for the build to update. You can use either the build ID or ARN value.
-
name
(Optional[NonZeroAndMaxString], default:
None
)
–
A descriptive label that is associated with a build. Build names do not need to be unique.
-
version
(Optional[NonZeroAndMaxString], default:
None
)
–
Version information that is associated with a build or script. Version strings do not need to be unique.
Raises:
-
InternalServiceException
–
The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
-
InvalidRequestException
–
One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.
-
NotFoundException
–
The requested resource was not found. The resource was either not created yet or deleted.
-
UnauthorizedException
–
The client failed authentication. Clients should not retry such requests.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_gamelift/_services/game_lift.py
| def update_build(
self,
*,
config_overrides: Optional[GameLiftClientConfig] = None,
build_id: Optional["capo_gamelift.types.build_id_or_arn.BuildIdOrArn"] = None,
name: Optional[
"capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
] = None,
version: Optional[
"capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
] = None,
) -> "capo_gamelift.types.update_build_output.UpdateBuildOutput":
"""<p> <b>This API works with the following fleet types:</b> EC2</p> <p>Updates metadata in a build resource, including the build name and version. To update the metadata, specify the build ID to update and provide the new values. If successful, a build object containing the updated metadata is returned.</p> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html"> Upload a Custom Server Build</a> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets">All APIs by task</a> </p>
Args:
build_id: <p>A unique identifier for the build to update. You can use either the build ID or ARN value. </p>
name: <p>A descriptive label that is associated with a build. Build names do not need to be unique. </p>
version: <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
Raises:
capo_gamelift.errors.internal_service_exception.InternalServiceException: <p>The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.</p>
capo_gamelift.errors.invalid_request_exception.InvalidRequestException: <p>One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.</p>
capo_gamelift.errors.not_found_exception.NotFoundException: <p>The requested resource was not found. The resource was either not created yet or deleted.</p>
capo_gamelift.errors.unauthorized_exception.UnauthorizedException: <p>The client failed authentication. Clients should not retry such requests.</p>
capo_gamelift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_gamelift.types.update_build_input.UpdateBuildInput]",
) -> OperationResponse[
"capo_gamelift.types.update_build_output.UpdateBuildOutput"
]:
import capo_gamelift._operations.game_lift.update_build
output, http_response = (
capo_gamelift._operations.game_lift.update_build.update_build(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateBuild")
)
input_: capo_gamelift.types.update_build_input.UpdateBuildInput = {}
if build_id is not None:
input_["build_id"] = build_id
if name is not None:
input_["name"] = name
if version is not None:
input_["version"] = version
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|