所有文档

          百度MapReduce BMR

          Instance(实例)

          查询实例列表

          如下代码可查询指定集群和实例组的实例:

          try:
              response = bmr_client.list_instances(cluster_id, instance_group_id)
              for instance in response.instances:
                  LOG.debug('list instances %s: %s' % (instance.id, instance))
          except BceHttpClientError as e:
              if isinstance(e.last_error, BceServerError):
                  LOG.error('list_instances failed. Response %s, code: %s, msg: %s'
                            % (e.last_error.status_code, e.last_error.code, e.last_error.message))
              else:
                  LOG.error('list_instances failed. Unknown exception: %s' % e)
          上一篇
          安装SDK工具包
          下一篇
          InstanceGroup(实例组)