Scalr\Service\Aws\Rds\V20141031\RdsApi::addTagsToResource PHP Method

addTagsToResource() public method

Adds metadata tags to an Amazon RDS resource.
public addTagsToResource ( string $resourceName, string $resourceType, Scalr\Service\Aws\Rds\DataType\TagsList $tagsList ) : array
$resourceName string Resource identifier for the Amazon RDS resource.
$resourceType string The type of Amazon RDS resource (db|es|og|pg|ri|secgrp|snapshot|subgrp)
$tagsList Scalr\Service\Aws\Rds\DataType\TagsList List of tags to add
return array Returns array of added tags
    public function addTagsToResource($resourceName, $resourceType, TagsList $tagsList)
    {
        $result = [];
        $options = $tagsList->getQueryArray();
        $options['ResourceName'] = $this->rds->getResourceName($resourceName, $resourceType);
        $response = $this->client->call(ucfirst(__FUNCTION__), $options);
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            $result = array_values($tagsList->getQueryArray());
        }
        return $result;
    }
RdsApi