Example #1
0
def connect_ecs(acs_access_key_id=None, acs_secret_access_key=None, **kwargs):
    """
    :type acs_access_key_id: string
    :param acs_access_key_id: Your Aliyun Access Key ID

    :type acs_secret_access_key: string
    :param acs_secret_access_key: Your Aliyun Secret Access Key

    :rtype: :class:`footmark.ecs.connection.ECSConnection`
    :return: A connection to Aliyun's ECS
    """
    from footmark.ecs.connection import ECSConnection
    return ECSConnection(acs_access_key_id, acs_secret_access_key, **kwargs)
Example #2
0
def connect_to_region(region_id, **kw_params):
    """
    Given a valid region name, return a
    :class:`footmark.ecs.connection.ECSConnection`.
    Any additional parameters after the region_name are passed on to
    the connect method of the region object.

    :type: str
    :param region_id: The ID of the region to connect to.

    :rtype: :class:`footmark.ecs.connection.ECSConnection` or ``None``
    :return: A connection to the given region, or None if an invalid region
             name is given
    """
    return ECSConnection(region=region_id, **kw_params)