updateBuild method
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
May throw InternalServiceException.
May throw InvalidRequestException.
May throw NotFoundException.
May throw UnauthorizedException.
Parameter buildId :
A unique identifier for the build to update. You can use either the build
ID or ARN value.
Parameter name :
A descriptive label that is associated with a build. Build names do not
need to be unique.
Parameter version :
Version information that is associated with a build or script. Version
strings do not need to be unique.
Implementation
Future<UpdateBuildOutput> updateBuild({
required String buildId,
String? name,
String? version,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.UpdateBuild'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'BuildId': buildId,
if (name != null) 'Name': name,
if (version != null) 'Version': version,
},
);
return UpdateBuildOutput.fromJson(jsonResponse.body);
}