tagResource method
Adds or updates tags for a resource in CodeCommit. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
May throw InvalidRepositoryNameException.
May throw InvalidResourceArnException.
May throw InvalidSystemTagUsageException.
May throw InvalidTagsMapException.
May throw RepositoryDoesNotExistException.
May throw ResourceArnRequiredException.
May throw TagPolicyException.
May throw TagsMapRequiredException.
May throw TooManyTagsException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the resource to which you want to add or
update tags.
Parameter tags :
The key-value pair to use when tagging this repository.
Implementation
Future<void> tagResource({
required String resourceArn,
required Map<String, String> tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'resourceArn': resourceArn,
'tags': tags,
},
);
}