/** * Create Key Pair * The CreateKeyPair operation creates a new 2048 bit RSA key pair and returns a * unique ID that can be used to reference this key pair when launching new * instances. For more information, see RunInstances. * * @see http://docs.amazonwebservices.com/AWSEC2/2008-12-01/DeveloperGuide/ApiReference-Query-CreateKeyPair.html * @param mixed $request array of parameters for Amazon_EC2_Model_CreateKeyPairRequest request * or Amazon_EC2_Model_CreateKeyPairRequest object itself * @see Amazon_EC2_Model_CreateKeyPair * @return Amazon_EC2_Model_CreateKeyPairResponse Amazon_EC2_Model_CreateKeyPairResponse * * @throws Amazon_EC2_Exception */ public function createKeyPair($request) { if (!$request instanceof Amazon_EC2_Model_CreateKeyPairRequest) { require_once 'Amazon/EC2/Model/CreateKeyPairRequest.php'; $request = new Amazon_EC2_Model_CreateKeyPairRequest($request); } require_once 'Amazon/EC2/Model/CreateKeyPairResponse.php'; return Amazon_EC2_Model_CreateKeyPairResponse::fromXML($this->_invoke($this->_convertCreateKeyPair($request))); }
/** * Create Key Pair * The CreateKeyPair operation creates a new 2048 bit RSA key pair and returns a * unique ID that can be used to reference this key pair when launching new * instances. For more information, see RunInstances. * * @see http://docs.amazonwebservices.com/AWSEC2/2008-12-01/DeveloperGuide/ApiReference-Query-CreateKeyPair.html * @param mixed $request array of parameters for Amazon_EC2_Model_CreateKeyPair request or Amazon_EC2_Model_CreateKeyPair object itself * @see Amazon_EC2_Model_CreateKeyPair * @return Amazon_EC2_Model_CreateKeyPairResponse Amazon_EC2_Model_CreateKeyPairResponse * * @throws Amazon_EC2_Exception */ public function createKeyPair($request) { require_once 'Amazon/EC2/Model/CreateKeyPairResponse.php'; return Amazon_EC2_Model_CreateKeyPairResponse::fromXML($this->_invoke('CreateKeyPair')); }