def retrieve_candidate_values(self, service, operation, param):
        """Retrieve server side completions.

        :type service: str
        :param service: The service name, e.g. 'ec2', 'iam'.

        :type operation: str
        :param operation: The operation name, in the casing
            used by the CLI (words separated by hyphens), e.g.
            'describe-instances', 'delete-user'.

        :type param: str
        :param param: The param name, as specified in the service
            model, e.g. 'InstanceIds', 'UserName'.

        :rtype: list
        :return: A list of possible completions for the
            service/operation/param combination.  If no
            completions were found an empty list is returned.

        """
        # Example call:
        # service='ec2',
        # operation='terminate-instances',
        # param='InstanceIds'.
        if service not in self._describer_creator.services_with_completions():
            return []
        try:
            client = self._client_creator.create_client(service)
        except BotoCoreError as e:
            # create_client() could raise an exception if the session
            # isn't fully configured (say it's missing a region).
            # However, we don't want to turn off all server side
            # completions because it's still possible to create
            # clients for some services without a region, e.g. IAM.
            LOG.debug("Error when trying to create a client for %s",
                      service, exc_info=True)
            return []
        api_operation_name = client.meta.method_to_api_mapping.get(
            operation.replace('-', '_'))
        if api_operation_name is None:
            return []
        # Now we need to convert the param name to the
        # casing used by the API.
        completer = self._describer_creator.create_completer_query(service)
        result = completer.describe_autocomplete(
            service, api_operation_name, param)
        if result is None:
            return
        try:
            response = getattr(client, xform_name(result.operation, '_'))()
        except Exception as e:
            LOG.debug("Error when calling %s.%s: %s", service,
                      result.operation, e, exc_info=True)
            return
        results = jmespath.search(result.path, response)
        return results
dataset/ETHPy150Open awslabs/aws-shell/awsshell/resource/index.py/ServerSideCompleter.retrieve_candidate_values/original