Changeset View
Changeset View
Standalone View
Standalone View
src/future/aws/management/PhutilAWSManagementWorkflow.php
Show All 37 Lines | protected function newAWSFuture($template) { | ||||
if (!strlen($region)) { | if (!strlen($region)) { | ||||
throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
pht( | pht( | ||||
'You must specify an AWS region with --region.')); | 'You must specify an AWS region with --region.')); | ||||
} | } | ||||
$template->setRegion($region); | $template->setRegion($region); | ||||
$endpoint = $argv->getArg('endpoint'); | |||||
if (!strlen($endpoint)) { | |||||
throw new PhutilArgumentUsageException( | |||||
pht( | |||||
'You must specify an AWS endpoint with --endpoint.')); | |||||
} | |||||
$template->setEndpoint($endpoint); | |||||
return $template; | return $template; | ||||
} | } | ||||
protected function getAWSArguments() { | protected function getAWSArguments() { | ||||
return array( | return array( | ||||
array( | array( | ||||
'name' => 'access-key', | 'name' => 'access-key', | ||||
'param' => 'key', | 'param' => 'key', | ||||
'help' => pht('AWS access key.'), | 'help' => pht('AWS access key.'), | ||||
), | ), | ||||
array( | array( | ||||
'name' => 'secret-key', | 'name' => 'secret-key', | ||||
'param' => 'file', | 'param' => 'file', | ||||
'help' => pht('AWS secret key.'), | 'help' => pht('AWS secret key.'), | ||||
), | ), | ||||
array( | array( | ||||
'name' => 'region', | 'name' => 'region', | ||||
'param' => 'region', | 'param' => 'region', | ||||
'help' => pht('AWS region.'), | 'help' => pht('AWS region.'), | ||||
), | ), | ||||
array( | |||||
'name' => 'endpoint', | |||||
'param' => 'endpoint', | |||||
'help' => pht('Name of the AWS region to access.'), | |||||
), | |||||
); | ); | ||||
} | } | ||||
} | } |