def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.sdb.connection.SDBConnection`. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.sdb.connection.SDBConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ return connect('sdb', region_name, region_cls=SDBRegionInfo, **kw_params)
def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.cloudformation.CloudFormationConnection`. :param str region_name: The name of the region to connect to. :rtype: :class:`boto.cloudformation.CloudFormationConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ return connect('cloudformation', region_name, connection_cls=CloudFormationConnection, **kw_params)
def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.ec2.elb.ELBConnection`. :param str region_name: The name of the region to connect to. :rtype: :class:`boto.ec2.ELBConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ return connect('elasticloadbalancing', region_name, connection_cls=ELBConnection, **kw_params)
def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.ec2.autoscale.AutoScaleConnection`. :param str region_name: The name of the region to connect to. :rtype: :class:`boto.ec2.AutoScaleConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ return connect('autoscaling', region_name, connection_cls=AutoScaleConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.s3.connection import S3Connection if 'host' in kw_params: host = kw_params.pop('host') if host not in ['', None]: region = S3RegionInfo( name='custom', endpoint=host, connection_cls=S3Connection ) return region.connect(**kw_params) return connect('s3', region_name, region_cls=S3RegionInfo, connection_cls=S3Connection, **kw_params)
def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.rds2.layer1.RDSConnection`. Any additional parameters after the region_name are passed on to the connect method of the region object. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.rds2.layer1.RDSConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ from boto.rds2.layer1 import RDSConnection return connect('rds', region_name, connection_cls=RDSConnection, **kw_params)
def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.ec2.connection.EC2Connection`. Any additional parameters after the region_name are passed on to the connect method of the region object. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.ec2.connection.EC2Connection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ if 'region' in kw_params and isinstance(kw_params['region'], RegionInfo)\ and region_name == kw_params['region'].name: return EC2Connection(**kw_params) return connect('ec2', region_name, connection_cls=EC2Connection, **kw_params)
def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.iam.connection.IAMConnection`. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.iam.connection.IAMConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ if region_name == 'universal': region = IAMRegionInfo( name='universal', endpoint='iam.amazonaws.com', connection_cls=IAMConnection ) return region.connect(**kw_params) return connect('iam', region_name, region_cls=IAMRegionInfo, connection_cls=IAMConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.ec2containerservice.layer1 import EC2ContainerServiceConnection return connect('ec2containerservice', region_name, connection_cls=EC2ContainerServiceConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.codedeploy.layer1 import CodeDeployConnection return connect('codedeploy', region_name, connection_cls=CodeDeployConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.configservice.layer1 import ConfigServiceConnection return connect('configservice', region_name, connection_cls=ConfigServiceConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.redshift.layer1 import RedshiftConnection return connect('redshift', region_name, connection_cls=RedshiftConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.cognito.sync.layer1 import CognitoSyncConnection return connect('cognito-sync', region_name, connection_cls=CognitoSyncConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.cognito.sync.layer1 import CognitoSyncConnection return connect('cognito-sync', region_name, connection_cls=CognitoSyncConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.beanstalk.layer1 import Layer1 return connect('elasticbeanstalk', region_name, connection_cls=Layer1, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.redshift.layer1 import RedshiftConnection return connect('redshift', region_name, connection_cls=RedshiftConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.logs.layer1 import CloudWatchLogsConnection return connect('logs', region_name, connection_cls=CloudWatchLogsConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.cognito.identity.layer1 import CognitoIdentityConnection return connect('cognito-identity', region_name, connection_cls=CognitoIdentityConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.opsworks.layer1 import OpsWorksConnection return connect('opsworks', region_name, connection_cls=OpsWorksConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.datapipeline.layer1 import DataPipelineConnection return connect('datapipeline', region_name, connection_cls=DataPipelineConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.awslambda.layer1 import AWSLambdaConnection return connect('awslambda', region_name, connection_cls=AWSLambdaConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.elastictranscoder.layer1 import ElasticTranscoderConnection return connect('elastictranscoder', region_name, connection_cls=ElasticTranscoderConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.opsworks.layer1 import OpsWorksConnection return connect('opsworks', region_name, connection_cls=OpsWorksConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.machinelearning.layer1 import MachineLearningConnection return connect('machinelearning', region_name, connection_cls=MachineLearningConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.elastictranscoder.layer1 import ElasticTranscoderConnection return connect('elastictranscoder', region_name, connection_cls=ElasticTranscoderConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.cognito.identity.layer1 import CognitoIdentityConnection return connect('cognito-identity', region_name, connection_cls=CognitoIdentityConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.cloudsearchdomain.layer1 import CloudSearchDomainConnection return connect('cloudsearchdomain', region_name, connection_cls=CloudSearchDomainConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.dynamodb.layer2 import Layer2 return connect('dynamodb', region_name, connection_cls=Layer2, **kw_params)
def connect_to_region(region_name, **kw_params): return connect('swf', region_name, connection_cls=boto.swf.layer1.Layer1, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.kinesis.layer1 import KinesisConnection return connect('kinesis', region_name, connection_cls=KinesisConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.directconnect.layer1 import DirectConnectConnection return connect('directconnect', region_name, connection_cls=DirectConnectConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.cloudhsm.layer1 import CloudHSMConnection return connect('cloudhsm', region_name, connection_cls=CloudHSMConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.beanstalk.layer1 import Layer1 return connect('elasticbeanstalk', region_name, connection_cls=Layer1, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.elasticache.layer1 import ElastiCacheConnection return connect('elasticache', region_name, connection_cls=ElastiCacheConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.datapipeline.layer1 import DataPipelineConnection return connect('datapipeline', region_name, connection_cls=DataPipelineConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.dynamodb2.layer1 import DynamoDBConnection return connect('dynamodb', region_name, connection_cls=DynamoDBConnection, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.glacier.layer2 import Layer2 return connect('glacier', region_name, connection_cls=Layer2, **kw_params)
def connect_to_region(region_name, **kw_params): from boto.logs.layer1 import CloudWatchLogsConnection return connect('logs', region_name, connection_cls=CloudWatchLogsConnection, **kw_params)