Esempio n. 1
0
 def __init__(self,
              aws_access_key_id=None,
              aws_secret_access_key=None,
              is_secure=True,
              port=None,
              proxy=None,
              proxy_port=None,
              proxy_user=None,
              proxy_pass=None,
              debug=0,
              https_connection_factory=None,
              region=None,
              path='/',
              converter=None):
     if not region:
         region = SDBRegionInfo(self, self.DefaultRegionName,
                                self.DefaultRegionEndpoint)
     self.region = region
     AWSQueryConnection.__init__(self, aws_access_key_id,
                                 aws_secret_access_key, is_secure, port,
                                 proxy, proxy_port, proxy_user, proxy_pass,
                                 self.region.endpoint, debug,
                                 https_connection_factory, path)
     self.box_usage = 0.0
     self.converter = converter
     self.item_cls = Item
Esempio n. 2
0
    def sns_connection():
        """ Create and return an SNS Connection """

        key_id = config.get('Credentials', 'aws_access_key_id')
        access_key = config.get('Credentials', 'aws_secret_access_key')

        # Undocumented way to connect SNS to a different zone... Create a SDBRegionInfo
        region_name = config.get('Credentials', 'region')
        region_endpoint = config.get('Boto', 'sns_endpoint')
        region = SDBRegionInfo(None, region_name, region_endpoint)

        # Build the connection using the keys and the new region
        conn = boto.connect_sns(key_id, access_key, region=region)

        return conn
Esempio n. 3
0
 def __init__(self,
              aws_access_key_id=None,
              aws_secret_access_key=None,
              is_secure=True,
              port=None,
              proxy=None,
              proxy_port=None,
              proxy_user=None,
              proxy_pass=None,
              debug=0,
              https_connection_factory=None,
              region=None,
              path='/',
              converter=None):
     """
     For any keywords that aren't documented, refer to the parent class,
     :py:class:`boto.connection.AWSAuthConnection`. You can avoid having
     to worry about these keyword arguments by instantiating these objects
     via :py:func:`boto.connect_sdb`.
 
     :type region: :class:`boto.sdb.regioninfo.SDBRegionInfo`
     :keyword region: Explicitly specify a region. Defaults to ``us-east-1`` 
         if not specified.
     """
     if not region:
         region = SDBRegionInfo(self, self.DefaultRegionName,
                                self.DefaultRegionEndpoint)
     self.region = region
     AWSQueryConnection.__init__(self, aws_access_key_id,
                                 aws_secret_access_key, is_secure, port,
                                 proxy, proxy_port, proxy_user, proxy_pass,
                                 self.region.endpoint, debug,
                                 https_connection_factory, path)
     self.box_usage = 0.0
     self.converter = converter
     self.item_cls = Item