Пример #1
0
 public function __construct(array $config)
 {
     parent::__construct($config);
     $list = $this->getHandlerList();
     $list->appendBuild($this->queueUrl(), 'sqs.queue_url');
     $list->appendSign($this->validateMd5(), 'sqs.md5');
 }
 public static function getArguments()
 {
     $args = parent::getArguments();
     $args['retries']['default'] = 11;
     $args['retries']['fn'] = [DynamoDbClient::class, '_applyRetryConfig'];
     return $args;
 }
Пример #3
0
 public function __construct(array $args)
 {
     $args['with_resolved'] = function (array $args) {
         $this->getHandlerList()->appendInit(CopySnapshotMiddleware::wrap($this, $args['endpoint_provider']), 'ec2.copy_snapshot');
     };
     parent::__construct($args);
 }
Пример #4
0
 public function __construct(array $config)
 {
     parent::__construct($config);
     $emitter = $this->getEmitter();
     $emitter->attach(new QueueUrlSubscriber());
     $emitter->attach(new Md5ValidatorSubscriber());
 }
Пример #5
0
 public static function getArguments()
 {
     $args = parent::getArguments();
     // STS does not require a region.
     $args['region']['default'] = 'us-east-1';
     return $args;
 }
 /**
  * {@inheritdoc}
  */
 public function getCommand($name, array $args = [])
 {
     $args = $args + ['Service' => 'AWSECommerceService', 'Operation' => $name];
     if (!isset($args['AssociateTag'])) {
         $args['AssociateTag'] = $this->getAssociateTag();
     }
     return parent::getCommand($name, $args);
 }
 public static function getArguments()
 {
     $args = parent::getArguments();
     $args['retries']['default'] = 11;
     $args['retries']['fn'] = [__CLASS__, '_applyRetryConfig'];
     $args['api_provider']['fn'] = [__CLASS__, '_applyApiProvider'];
     return $args;
 }
Пример #8
0
 public function getCommand($name, array $args = [])
 {
     // Set the default accountId to "-" for all operations.
     if (!isset($args['accountId'])) {
         $args['accountId'] = '-';
     }
     return parent::getCommand($name, $args);
 }
Пример #9
0
 public function __construct(array $args)
 {
     $args['with_resolved'] = function (array $args) {
         $copySnap = new CopySnapshotSubscriber($args['endpoint_provider']);
         $this->getEmitter()->attach($copySnap);
     };
     parent::__construct($args);
 }
Пример #10
0
 public static function getArguments()
 {
     $args = parent::getArguments();
     // Apply custom retry strategy for DynamoDB.
     $args['retries']['default'] = 11;
     $args['retries']['fn'] = [__CLASS__, '_applyRetryConfig'];
     return $args;
 }
Пример #11
0
 public function __call($name, array $args)
 {
     // Overcomes a naming collision with `AwsClient::getConfig`.
     if (lcfirst($name) === 'getConfigFiles') {
         $name = 'GetConfig';
     } elseif (lcfirst($name) === 'getConfigFilesAsync') {
         $name = 'GetConfigAsync';
     }
     return parent::__call($name, $args);
 }
 public function __construct(array $args)
 {
     if (!isset($args['signing_name'])) {
         $args['signing_name'] = 'elasticloadbalancing';
     }
     if (!isset($args['endpoint'])) {
         $scheme = isset($args['scheme']) ? $args['scheme'] : 'https';
         $args['endpoint'] = "{$scheme}://elasticloadbalancing.{$args['region']}.amazonaws.com";
     }
     parent::__construct($args);
 }
 public static function getArguments()
 {
     $args = parent::getArguments();
     $args['endpoint']['required'] = true;
     $args['region']['default'] = function (array $args) {
         // Determine the region from the provided endpoint.
         // (e.g. http://search-blah.{region}.cloudsearch.amazonaws.com)
         return explode('.', new Uri($args['endpoint']))[1];
     };
     return $args;
 }
Пример #14
0
 /**
  * {@inheritdoc}
  *
  * In addition to the options available to
  * {@see Aws\AwsClient::__construct}, S3Client accepts the following
  * options:
  *
  * - bucket_endpoint: (bool) Set to true to send requests to a
  *   hardcoded bucket endpoint rather than create an endpoint as a result
  *   of injecting the bucket into the URL. This option is useful for
  *   interacting with CNAME endpoints.
  * - calculate_md5: (bool) Set to false to disable calculating an MD5
  *   for all Amazon S3 signed uploads.
  * - force_path_style: (bool) Set to true to send requests using path
  *   style bucket addressing (e.g., https://s3.amazonaws.com/bucket/key).
  *
  * @param array $args
  */
 public function __construct(array $args)
 {
     parent::__construct($args);
     $em = $this->getEmitter();
     $em->attach(new BucketStyleSubscriber($this->getConfig('bucket_endpoint')));
     $em->attach(new PermanentRedirectSubscriber());
     $em->attach(new SSECSubscriber());
     $em->attach(new PutObjectUrlSubscriber());
     $em->attach(new SourceFile($this->getApi()));
     $em->attach(new ApplyMd5Subscriber());
     $em->attach(new SaveAs());
 }
Пример #15
0
 /**
  * {@inheritdoc}
  *
  * In addition to the options available to
  * {@see Aws\AwsClient::__construct}, S3Client accepts the following
  * options:
  *
  * - bucket_endpoint: (bool) Set to true to send requests to a
  *   hardcoded bucket endpoint rather than create an endpoint as a result
  *   of injecting the bucket into the URL. This option is useful for
  *   interacting with CNAME endpoints.
  * - calculate_md5: (bool) Set to false to disable calculating an MD5
  *   for all Amazon S3 signed uploads.
  *
  * @param array $args
  */
 public function __construct(array $args)
 {
     parent::__construct($args);
     $stack = $this->getHandlerList();
     $stack->appendInit(SSECMiddleware::wrap($this->getEndpoint()->getScheme()), 's3.ssec');
     $stack->appendBuild(ApplyChecksumMiddleware::wrap(), 's3.checksum');
     $stack->appendBuild(Middleware::contentType(['PutObject', 'UploadPart']), 's3.content_type');
     // Use the bucket style middleware when using a "bucket_endpoint" (for cnames)
     if ($this->getConfig('bucket_endpoint')) {
         $stack->appendBuild(BucketEndpointMiddleware::wrap(), 's3.bucket_endpoint');
     }
     $stack->appendSign(PutObjectUrlMiddleware::wrap(), 's3.put_object_url');
     $stack->appendSign(PermanentRedirectMiddleware::wrap(), 's3.permanent_redirect');
     $stack->appendInit(Middleware::sourceFile($this->getApi()), 's3.source_file');
     $stack->appendInit($this->getSaveAsParameter(), 's3.save_as');
     $stack->appendInit($this->getLocationConstraintMiddleware(), 's3.location');
 }
Пример #16
0
 /**
  * {@inheritdoc}
  *
  * Sets the default accountId to "-" for all operations.
  */
 public function getCommand($name, array $args = [])
 {
     return parent::getCommand($name, $args + ['accountId' => '-']);
 }
Пример #17
0
 public function __construct(array $args)
 {
     parent::__construct($args);
     $this->getEmitter()->attach(new CleanIdSubscriber());
 }
Пример #18
0
 /**
  * {@inheritdoc}
  */
 public function getCommand($name, array $args = [])
 {
     return parent::getCommand($name, $args);
 }
Пример #19
0
 public function __construct(array $args)
 {
     parent::__construct($args);
     $this->getHandlerList()->appendInit($this->cleanIdFn(), 'route53.clean_id');
 }
 public function __construct(array $args)
 {
     parent::__construct($args + ['service' => $this->getService(), 'signature_version' => 'v2']);
 }
Пример #21
0
 public function __construct(array $args)
 {
     parent::__construct($args);
     $stack = $this->getHandlerList();
     $stack->appendBuild([__CLASS__, '_add_accept_header']);
 }
 public function __construct(array $config)
 {
     parent::__construct($config);
     $list = $this->getHandlerList();
     $list->appendBuild($this->predictEndpoint(), 'ml.predict_endpoint');
 }