def __init__(self, region_id, service, access_key_id=None,
                 secret_access_key=None):
        if not region_id:
            raise Error('region_id is required')
        if not service:
            raise Error('service is required')

        self.region_id = region_id
        if service == 'ecs':
            self.service = 'https://ecs.aliyuncs.com'
            self.version = '2014-05-26'
        elif service == 'slb':
            self.service = 'https://slb.aliyuncs.com'
            self.version = '2014-05-15'
        elif service == 'dns':
            self.service = 'https://dns.aliyuncs.com'
            self.version = '2015-01-09'
        elif service == 'rds':
            self.service = 'https://rds.aliyuncs.com'
            self.version = '2014-08-15'
        else:
            raise NotImplementedError(
                'Currently only "ecs", "dns", "rds" and "slb" are supported.')

        if access_key_id is None or secret_access_key is None:
            creds = find_credentials()
            self.access_key_id = creds.access_key_id
            self.secret_access_key = creds.secret_access_key
        else:
            self.access_key_id = access_key_id
            self.secret_access_key = secret_access_key

        logger.debug("%s connection to %s created", service, region_id)
Returns the next previous word in the sentence with the given type.
dataset/ETHPy150Open quixey/python-aliyun/aliyun/connection.py/Connection.__init__--crossover with--dataset/ETHPy150Open markuskiller/textblob-de/textblob_de/ext/_pattern/text/tree.py/Word.previous