本文整理汇总了PHP中Aws\Common\Aws::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Aws::get方法的具体用法?PHP Aws::get怎么用?PHP Aws::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aws\Common\Aws
的用法示例。
在下文中一共展示了Aws::get方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($accessKeyId, $secretAccessKey, $bucket, $region, $host)
{
$this->bucket = $bucket;
$this->host = $host;
$this->accesKeyId = $accessKeyId;
$this->aws = Aws::factory(array('key' => $accessKeyId, 'secret' => $secretAccessKey, 'region' => $region));
$this->s3 = $this->aws->get('s3');
}
示例2: getSnsClient
function getSnsClient()
{
if ($this->snsClient) {
return $this->snsClient;
}
$this->snsClient = $this->aws->get('sns');
$this->snsClient->setRegion($this->topicRegion);
return $this->snsClient;
}
示例3: getPublicDNSFromEBEnvironmentName
public function getPublicDNSFromEBEnvironmentName($envName)
{
$ec2Client = $this->providedAws->get('ec2');
$result = $ec2Client->describeInstances(array('Filters' => array(array('Name' => 'tag-key', 'Values' => array('elasticbeanstalk:environment-name')), array('Name' => 'tag-value', 'Values' => array($envName)))));
$dnsArray = array();
//ugh, no dot notation checks
$reservations = $result->get('Reservations', array());
if (count($reservations) > 0) {
foreach ($reservations as $reservation) {
if (isset($reservation['Instances']) && count($reservation['Instances']) > 0) {
$instance = $reservation['Instances'][0];
$dnsArray[] = $instance['PublicDnsName'];
}
}
}
return $dnsArray;
}
示例4: getAws
/**
* Get aws object or aws service
*
* @return mixed
*/
protected function getAws($service = null)
{
if (is_null($this->aws)) {
$this->aws = Aws::factory($this->getAwsCredentials());
}
if (!is_null($service)) {
return $this->aws->get($service);
}
return $this->aws;
}
示例5: getDynamoDbClient
/**
* @param Aws $aws
* @return DynamoDbClient
*/
private function getDynamoDbClient(Aws $aws)
{
return $aws->get('dynamodb');
}
示例6: getClient
/**
* Returns the instance of the client that the facade operates on
*
* @return \Aws\Common\Client\AwsClientInterface
*/
public static function getClient()
{
return self::$serviceBuilder->get(static::getServiceBuilderKey());
}
示例7: __construct
public function __construct(Aws $aws, LoggerInterface $logger)
{
parent::__construct();
$this->client = $aws->get('ElasticBeanstalk');
$this->logger = $logger;
}
示例8: getSqs
/**
* @return SqsClient
*/
function getSqs()
{
return $this->aws->get('sqs');
}
示例9: get
/**
*
*
* @static
*/
public static function get($name, $throwAway = false)
{
//Method inherited from \Guzzle\Service\Builder\ServiceBuilder
return \Aws\Common\Aws::get($name, $throwAway);
}
示例10: getSwfClient
/**
* @return SwfClient
*/
public function getSwfClient()
{
/** @var $client SwfClient */
$client = $this->awsBaseServiceFactory->get(self::AWS_SERVICE_SWF);
return $client;
}