'Associates one of the stack\'s registered Elastic IP addresses
with a specified instance. The address must first be
registered with the stack by calling RegisterElasticIp. For
more information, see `Resource Management`_.
**Required Permissions**: To use this action, an IAM user must
have a Manage permissions level for the stack, or an attached
policy that explicitly grants permissions. For more
information on user permissions, see `Managing User
Permissions`_.
:type elastic_ip: string
:param elastic_ip: The Elastic IP address.
:type instance_id: string
:param instance_id: The instance ID.'

def associate_elastic_ip(self, elastic_ip, instance_id=None):

    params = {'ElasticIp': elastic_ip}
    if (instance_id is not None):
        params['InstanceId'] = instance_id
    return self.make_request(action='AssociateElasticIp', body=json.dumps(params))
