tagProject method
Adds tags to a project.
May throw ProjectNotFoundException. May throw ValidationException. May throw LimitExceededException. May throw ConcurrentModificationException.
Parameter id
:
The ID of the project you want to add a tag to.
Parameter tags
:
The tags you want to add to the project.
Implementation
Future<TagProjectResult> tagProject({
required String id,
required Map<String, String> tags,
}) async {
ArgumentError.checkNotNull(id, 'id');
_s.validateStringLength(
'id',
id,
2,
15,
isRequired: true,
);
ArgumentError.checkNotNull(tags, 'tags');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeStar_20170419.TagProject'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'id': id,
'tags': tags,
},
);
return TagProjectResult.fromJson(jsonResponse.body);
}