updateProject method
Modifies the specified project name, given the project ARN and a new name.
May throw ArgumentException. May throw NotFoundException. May throw LimitExceededException. May throw ServiceAccountException.
Parameter arn
:
The Amazon Resource Name (ARN) of the project whose name to update.
Parameter defaultJobTimeoutMinutes
:
The number of minutes a test run in the project executes before it times
out.
Parameter name
:
A string that represents the new name of the project that you are
updating.
Implementation
Future<UpdateProjectResult> updateProject({
required String arn,
int? defaultJobTimeoutMinutes,
String? name,
}) async {
ArgumentError.checkNotNull(arn, 'arn');
_s.validateStringLength(
'arn',
arn,
32,
1011,
isRequired: true,
);
_s.validateStringLength(
'name',
name,
0,
256,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DeviceFarm_20150623.UpdateProject'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'arn': arn,
if (defaultJobTimeoutMinutes != null)
'defaultJobTimeoutMinutes': defaultJobTimeoutMinutes,
if (name != null) 'name': name,
},
);
return UpdateProjectResult.fromJson(jsonResponse.body);
}