untagResource method

Future<void> untagResource({
  1. required String resourceArn,
  2. required List<String> tagKeys,
})

Removes tags for a resource in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.

May throw RepositoryDoesNotExistException. May throw InvalidRepositoryNameException. May throw ResourceArnRequiredException. May throw InvalidResourceArnException. May throw TagKeysListRequiredException. May throw InvalidTagKeysListException. May throw TooManyTagsException. May throw InvalidSystemTagUsageException. May throw TagPolicyException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource to which you want to remove tags.

Parameter tagKeys : The tag key for each tag that you want to remove from the resource.

Implementation

Future<void> untagResource({
  required String resourceArn,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeCommit_20150413.UntagResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'resourceArn': resourceArn,
      'tagKeys': tagKeys,
    },
  );
}