public createDBClusterSnapshot ( string $dbClusterIdentifier, string $dbClusterSnapshotIdentifier, Scalr\Service\Aws\Rds\DataType\TagsList $tags = null ) : Scalr\Service\Aws\Rds\DataType\DBClusterSnapshotData | ||
$dbClusterIdentifier | string | The identifier of the DB cluster to create a snapshot for. This parameter is not case-sensitive. |
$dbClusterSnapshotIdentifier | string | The identifier of the DB cluster snapshot. This parameter is stored as a lowercase string. |
$tags | Scalr\Service\Aws\Rds\DataType\TagsList | optional The tags to be assigned to the DB cluster snapshot. |
리턴 | Scalr\Service\Aws\Rds\DataType\DBClusterSnapshotData | Returns created DB cluster snapshot |
public function createDBClusterSnapshot($dbClusterIdentifier, $dbClusterSnapshotIdentifier, TagsList $tags = null)
{
$result = null;
$options = [];
if (count($tags) > 0) {
$options = $tags->getQueryArray();
}
if ($dbClusterIdentifier !== null) {
$options['DBClusterIdentifier'] = (string) $dbClusterIdentifier;
}
if ($dbClusterSnapshotIdentifier !== null) {
$options['DBClusterSnapshotIdentifier'] = (string) $dbClusterSnapshotIdentifier;
}
$response = $this->client->call(ucfirst(__FUNCTION__), $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
if (!$this->exist($sxml->CreateDBClusterSnapshotResult)) {
throw new RdsException(sprintf(self::UNEXPECTED, 'create DBClusterSnapshot'));
}
$result = $this->_loadDBClusterSnapshotData($sxml->CreateDBClusterSnapshotResult->DBClusterSnapshot);
}
return $result;
}