UpdateBuild
Updates metadata in a build record, 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
Related operations
-
UpdateBuild
Request Syntax
{ "BuildId": "
string
", "Name": "string
", "Version": "string
" }
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
Note
In the following list, the required parameters are described first.
- BuildId
-
A unique identifier for a build to update.
Type: String
Pattern:
^build-\S+
Required: Yes
- Name
-
A descriptive label that is associated with a build. Build names do not need to be unique.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Required: No
- Version
-
Version information that is associated with a build or script. Version strings do not need to be unique.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Required: No
Response Syntax
{ "Build": { "BuildId": "string", "CreationTime": number, "Name": "string", "OperatingSystem": "string", "SizeOnDisk": number, "Status": "string", "Version": "string" } }
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServiceException
-
The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
HTTP Status Code: 500
- InvalidRequestException
-
One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.
HTTP Status Code: 400
- NotFoundException
-
A service resource associated with the request could not be found. Clients should not retry such requests.
HTTP Status Code: 400
- UnauthorizedException
-
The client failed authentication. Clients should not retry such requests.
HTTP Status Code: 400
Example
Change a build record
This example changes a build record from the name "My_Game_Server_Build_One" and version number "12345.678". These are the only elements of a build record that can be changed. The returned build record verifies that the changes were made.
HTTP requests are authenticated using an AWS Signature Version 4 signature in the Authorization header field.
Sample Request
POST / HTTP/1.1 Host: gamelift.us-west-2.amazonaws.com; Accept-Encoding: identity Content-Length: 131 User-Agent: aws-cli/1.11.36 Python/2.7.9 Windows/7 botocore/1.4.93 Content-Type: application/x-amz-json-1.0 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20170406/us-west-2/gamelift/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY X-Amz-Date: 20170406T004805Z X-Amz-Target: GameLift.UpdateBuild { "BuildId": "build-1111aaaa-22bb-33cc-44dd-5555eeee66ff", "Name": "My_Game_Server_Build_Foo", "Version": "12345.f00" }
Sample Response
HTTP/1.1 200 OK x-amzn-RequestId: b34f8665-EXAMPLE Content-Type: application/x-amz-json-1.1 Content-Length: 310 Date: Thu, 06 Apr 2017 00:48:07 GMT { "Build": { "BuildId": "build-1111aaaa-22bb-33cc-44dd-5555eeee66ff", "CreationTime": 1496708916.18, "Name": "My_Game_Server_Build_Foo", "OperatingSystem": "AMAZON_LINUX", "SizeOnDisk": 0, "Status": "INITIALIZED", "Version": "12345.f00" } }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: