/** * DeleteTags action * * Deletes a specific set of tags from a specific set of resources. This call is designed to follow a * DescribeTags call. You first determine what tags a resource has, and then you call DeleteTags with * the resource ID and the specific tags you want to delete. * * @param ListDataType $resourceIdList The ID of a resource to tag. For example, ami-1a2b3c4d. * You can specify multiple resources to assign the tags to. * @param ResourceTagSetList $tagList The key/value pair list of the Tags. * @return bool Returns true on success or throws an exception otherwise * @throws ClientException * @throws Ec2Exception */ public function deleteTags(ListDataType $resourceIdList, ResourceTagSetList $tagList) { $result = false; $options = array_merge($resourceIdList->getQueryArrayBare('ResourceId'), array_filter($tagList->getQueryArrayBare('Tag'), function ($val) { return $val !== null; })); $response = $this->client->call(ucfirst(__FUNCTION__), $options); if ($response->getError() === false) { //Success $sxml = simplexml_load_string($response->getRawContent()); if ((string) $sxml->return != 'true') { throw new Ec2Exception(sprintf('Amazon Ec2 could not delete the Tags. It returned "%s"', $sxml->return)); } $result = true; } return $result; }