

def associate_static_ip(self, parameters, instance_id, elastic_ip):
    'Associates the given Elastic IP address with the given instance ID.\n\n    Args:\n      parameters: A dict that includes the credentials necessary to communicate\n        with Amazon Web Services.\n      instance_id: A str naming the running instance to associate an Elastic IP\n        with.\n      elastic_ip: A str naming the already allocated Elastic IP address that\n        will be associated.\n    '
    try:
        conn = self.open_connection(parameters)
        conn.associate_address(instance_id, elastic_ip)
    except EC2ResponseError as exception:
        self.handle_failure('Unable to associate Elastic IP {0} with instance ID {1} because: {2}'.format(elastic_ip, elastic_ip, exception.error_message))

dataset/ETHPy150Open AppScale/appscale-tools/lib/agents/ec2_agent.py EC2Agent.associate_static_ip/VarMisuse@58/245 `instance_id`->`elastic_ip`